Enum Header

Source
pub enum Header {
    V1(Header),
    V2(Header),
    V3(Header),
    V99(Header),
}
Expand description

Each variant represents a specific minor version header.

Variants§

Implementations§

Source§

impl Header

Source

pub fn version(&self) -> Version

Source

pub(crate) fn create( chain_config: ChainConfig, height: u64, timestamp: u64, l1_head: u64, l1_finalized: Option<L1BlockInfo>, payload_commitment: VidCommitment, builder_commitment: BuilderCommitment, ns_table: NsTable, fee_merkle_tree_root: FeeMerkleCommitment, block_merkle_tree_root: BlockMerkleCommitment, reward_merkle_tree_root: Option<RewardMerkleCommitment>, fee_info: Vec<FeeInfo>, builder_signature: Vec<BuilderSignature>, version: Version, ) -> Self

Source§

impl Header

Source

fn from_info( payload_commitment: VidCommitment, builder_commitment: BuilderCommitment, ns_table: NsTable, parent_leaf: &Leaf2, l1: L1Snapshot, l1_deposits: &[FeeInfo], builder_fee: Vec<BuilderFee<SeqTypes>>, view_number: u64, timestamp: u64, state: ValidatedState, chain_config: ChainConfig, version: Version, auction_results: Option<SolverAuctionResults>, validator: Option<Validator<BLSPubKey>>, ) -> Result<Self>

Source

async fn get_chain_config( validated_state: &ValidatedState, instance_state: &NodeState, ) -> Result<ChainConfig>

Source§

impl Header

Source

pub fn chain_config(&self) -> ResolvableChainConfig

A commitment to a ChainConfig or a full ChainConfig.

Source

pub fn height(&self) -> u64

Source

pub fn height_mut(&mut self) -> &mut u64

Source

pub fn timestamp(&self) -> u64

Source

pub fn timestamp_mut(&mut self) -> &mut u64

Source

pub fn l1_head(&self) -> u64

The Espresso block header includes a reference to the current head of the L1 chain.

Rollups can use this to facilitate bridging between the L1 and L2 in a deterministic way. This field deterministically associates an L2 block with a recent L1 block the instant the L2 block is sequenced. Rollups can then define the L2 state after this block as the state obtained by executing all the transactions in this block plus all the L1 deposits up to the given L1 block number. Since there is no need to wait for the L2 block to be reflected on the L1, this bridge design retains the low confirmation latency of HotShot.

This block number indicates the unsafe head of the L1 chain, so it is subject to reorgs. For this reason, the Espresso header does not include any information that might change in a reorg, such as the L1 block timestamp or hash. It includes only the L1 block number, which will always refer to some block after a reorg: if the L1 head at the time this block was sequenced gets reorged out, the L1 chain will eventually (and probably quickly) grow to the same height once again, and a different block will exist with the same height. In this way, Espresso does not have to handle L1 reorgs, and the Espresso blockchain will always be reflective of the current state of the L1 blockchain. Rollups that use this block number do have to handle L1 reorgs, but each rollup and each rollup client can decide how many confirmations they want to wait for on top of this l1_head before they consider an L2 block finalized. This offers a tradeoff between low-latency L1-L2 bridges and finality.

Rollups that want a stronger guarantee of finality, or that want Espresso to attest to data from the L1 block that might change in reorgs, can instead use the latest L1 finalized block at the time this L2 block was sequenced: Self::l1_finalized.

Source

pub fn l1_head_mut(&mut self) -> &mut u64

Source

pub fn l1_finalized(&self) -> Option<L1BlockInfo>

The Espresso block header includes information about the latest finalized L1 block.

Similar to l1_head, rollups can use this information to implement a bridge between the L1 and L2 while retaining the finality of low-latency block confirmations from HotShot. Since this information describes the finalized L1 block, a bridge using this L1 block will have much higher latency than a bridge using l1_head. In exchange, rollups that use the finalized block do not have to worry about L1 reorgs, and can inject verifiable attestations to the L1 block metadata (such as its timestamp or hash) into their execution layers, since Espresso replicas will sign this information for the finalized L1 block.

This block may be None in the rare case where Espresso has started shortly after the genesis of the L1, and the L1 has yet to finalize a block. In all other cases it will be Some.

Source

pub fn l1_finalized_mut(&mut self) -> &mut Option<L1BlockInfo>

Source

pub fn payload_commitment(&self) -> VidCommitment

Source

pub fn payload_commitment_mut(&mut self) -> &mut VidCommitment

Source

pub fn builder_commitment(&self) -> &BuilderCommitment

Source

pub fn builder_commitment_mut(&mut self) -> &mut BuilderCommitment

Source

pub fn ns_table(&self) -> &NsTable

Source

pub fn block_merkle_tree_root(&self) -> BlockMerkleCommitment

Root Commitment of Block Merkle Tree

Source

pub fn block_merkle_tree_root_mut(&mut self) -> &mut BlockMerkleCommitment

Source

pub fn fee_merkle_tree_root(&self) -> FeeMerkleCommitment

Root Commitment of FeeMerkleTree

Source

pub fn fee_merkle_tree_root_mut(&mut self) -> &mut FeeMerkleCommitment

Source

pub fn fee_info(&self) -> Vec<FeeInfo>

Fee paid by the block builder

Source

pub fn reward_merkle_tree_root(&self) -> RewardMerkleCommitment

Fee paid by the block builder

Source

pub fn builder_signature(&self) -> Vec<BuilderSignature>

Account (etheruem address) of builder

This signature is not considered formally part of the header; it is just evidence proving that other parts of the header (fee_info) are correct. It exists in the header so that it is available to all nodes to be used during validation. But since it is checked during consensus, any downstream client who has a proof of consensus finality of a header can trust that fee_info is correct without relying on the signature. Thus, this signature is not included in the header commitment.

Trait Implementations§

Source§

impl BlockHeader<SeqTypes> for Header

Source§

fn get_auction_results(&self) -> Option<SolverAuctionResults>

Get the results of the auction for this Header. Only used in post-marketplace versions

Source§

async fn new_marketplace( parent_state: &<SeqTypes as NodeType>::ValidatedState, instance_state: &<<SeqTypes as NodeType>::ValidatedState as ValidatedState<SeqTypes>>::Instance, parent_leaf: &Leaf2<SeqTypes>, payload_commitment: VidCommitment, builder_commitment: BuilderCommitment, metadata: <<SeqTypes as NodeType>::BlockPayload as BlockPayload<SeqTypes>>::Metadata, builder_fee: Vec<BuilderFee<SeqTypes>>, view_number: u64, auction_results: Option<SolverAuctionResults>, version: Version, ) -> Result<Self, Self::Error>

Build a header with the parent validate state, instance-level state, parent leaf, payload commitment, metadata, and auction results. This is only used in post-marketplace versions

Source§

fn builder_commitment(&self) -> BuilderCommitment

Commit over fee_amount, payload_commitment and metadata

Source§

type Error = InvalidBlockHeader

Error type for this type of block header
Source§

async fn new_legacy( parent_state: &ValidatedState, instance_state: &NodeState, parent_leaf: &Leaf2, payload_commitment: VidCommitment, builder_commitment: BuilderCommitment, metadata: <<SeqTypes as NodeType>::BlockPayload as BlockPayload<SeqTypes>>::Metadata, builder_fee: BuilderFee<SeqTypes>, version: Version, view_number: u64, ) -> Result<Self, Self::Error>

Build a header with the parent validate state, instance-level state, parent leaf, payload and builder commitments, and metadata. This is only used in pre-marketplace versions
Source§

fn genesis( instance_state: &NodeState, payload_commitment: VidCommitment, builder_commitment: BuilderCommitment, ns_table: <<SeqTypes as NodeType>::BlockPayload as BlockPayload<SeqTypes>>::Metadata, ) -> Self

Build the genesis header, payload, and metadata.
Source§

fn block_number(&self) -> u64

Get the block number.
Source§

fn payload_commitment(&self) -> VidCommitment

Get the payload commitment.
Source§

fn metadata( &self, ) -> &<<SeqTypes as NodeType>::BlockPayload as BlockPayload<SeqTypes>>::Metadata

Get the metadata.
Source§

fn get_light_client_state( &self, view: <SeqTypes as NodeType>::View, ) -> Result<LightClientState>

Get the light client state
Source§

impl Clone for Header

Source§

fn clone(&self) -> Header

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Committable for Header

Source§

fn commit(&self) -> Commitment<Self>

Create a binding commitment to self.
Source§

fn tag() -> String

Tag that should be used when serializing commitments to this type. Read more
Source§

impl Debug for Header

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for Header

Source§

fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
where D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl ExplorerHeader<SeqTypes> for Header

Source§

fn reward_balance(&self) -> Self::BalanceAmount

reward_balance at the moment is only implemented as a stub, as block rewards have not yet been implemented.

TODO: update implementation when rewards have been created / supported. Issue: https://github.com/EspressoSystems/espresso-sequencer/issues/1453

Source§

type BalanceAmount = FeeAmount

BalanceAmount is a type that represents a general balance amount. It does not indicate how this balance is represented, just that there is a representation of it that adheres to the trait restrictions specified.
Source§

type WalletAddress = Vec<FeeAccount>

WalletAddress is a type that represents the address of a Wallet. It does not indicate how this address is represented, just that there is a representation of it that adheres to the trait restrictions specified.
Source§

type ProposerId = Vec<FeeAccount>

ProposerId is a type that represents the proposer id of the block. It does not indicate how this proposer id is represented, just that there is a representation of it that adheres to the trait restrictions specified.
Source§

type NamespaceId = NamespaceId

NamespaceId is a type that represents the id of a namespace. It does not indicate how this namespace id is represented, just that there is a representation of it that adheres to the trait restrictions specified.
Source§

fn proposer_id(&self) -> Self::ProposerId

The proposer id of the block as stored within the block header.
Source§

fn fee_info_account(&self) -> Self::WalletAddress

The wallet address of the fee info account contained within the block header.
Source§

fn fee_info_balance(&self) -> Self::BalanceAmount

The balance amount of the fee info contained within the block header.
Source§

fn namespace_ids(&self) -> Vec<Self::NamespaceId>

A collection of namespace ids that are contained within the block header.
Source§

impl Hash for Header

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl PartialEq for Header

Source§

fn eq(&self, other: &Header) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl QueryableHeader<SeqTypes> for Header

Source§

fn timestamp(&self) -> u64

Source§

impl Serialize for Header

Source§

fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl Eq for Header

Source§

impl StructuralPartialEq for Header

Auto Trait Implementations§

§

impl Freeze for Header

§

impl RefUnwindSafe for Header

§

impl Send for Header

§

impl Sync for Header

§

impl Unpin for Header

§

impl UnwindSafe for Header

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<T> ArchivePointee for T

§

type ArchivedMetadata = ()

The archived version of the pointer metadata for this type.
§

fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata

Converts some archived metadata to the pointer metadata for itself.
§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( self, class: Class, constructed: bool, tag: u32, ) -> TaggedParser<'a, Implicit, Self, E>

Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> CallHasher for T
where T: Hash + ?Sized,

§

fn get_hash<H, B>(value: &H, build_hasher: &B) -> u64
where H: Hash + ?Sized, B: BuildHasher,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
§

impl<T> Conv for T

§

fn conv<T>(self) -> T
where Self: Into<T>,

Converts self into T using Into<T>. Read more
§

impl<F, W, T, D> Deserialize<With<T, W>, D> for F
where W: DeserializeWith<F, T, D>, D: Fallible + ?Sized, F: ?Sized,

§

fn deserialize( &self, deserializer: &mut D, ) -> Result<With<T, W>, <D as Fallible>::Error>

Deserializes using the given deserializer
§

impl<T> Downcast for T
where T: Any,

§

fn into_any(self: Box<T>) -> Box<dyn Any>

Convert Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.
§

fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>

Convert Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be further downcast into Rc<ConcreteType> where ConcreteType implements Trait.
§

fn as_any(&self) -> &(dyn Any + 'static)

Convert &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &Any’s vtable from &Trait’s.
§

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

Convert &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s.
§

impl<T> DowncastSync for T
where T: Any + Send + Sync,

§

fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Sync + Send>

Convert Arc<Trait> (where Trait: Downcast) to Arc<Any>. Arc<Any> can then be further downcast into Arc<ConcreteType> where ConcreteType implements Trait.
Source§

impl<T> DynClone for T
where T: Clone,

§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
§

impl<T> FmtForward for T

§

fn fmt_binary(self) -> FmtBinary<Self>
where Self: Binary,

Causes self to use its Binary implementation when Debug-formatted.
§

fn fmt_display(self) -> FmtDisplay<Self>
where Self: Display,

Causes self to use its Display implementation when Debug-formatted.
§

fn fmt_lower_exp(self) -> FmtLowerExp<Self>
where Self: LowerExp,

Causes self to use its LowerExp implementation when Debug-formatted.
§

fn fmt_lower_hex(self) -> FmtLowerHex<Self>
where Self: LowerHex,

Causes self to use its LowerHex implementation when Debug-formatted.
§

fn fmt_octal(self) -> FmtOctal<Self>
where Self: Octal,

Causes self to use its Octal implementation when Debug-formatted.
§

fn fmt_pointer(self) -> FmtPointer<Self>
where Self: Pointer,

Causes self to use its Pointer implementation when Debug-formatted.
§

fn fmt_upper_exp(self) -> FmtUpperExp<Self>
where Self: UpperExp,

Causes self to use its UpperExp implementation when Debug-formatted.
§

fn fmt_upper_hex(self) -> FmtUpperHex<Self>
where Self: UpperHex,

Causes self to use its UpperHex implementation when Debug-formatted.
§

fn fmt_list(self) -> FmtList<Self>
where &'a Self: for<'a> IntoIterator,

Formats each item in a sequence. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
§

impl<T> LayoutRaw for T

§

fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>

Gets the layout of the type.
§

impl<T> Pipe for T
where T: ?Sized,

§

fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> R
where Self: Sized,

Pipes by value. This is generally the method you want to use. Read more
§

fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> R
where R: 'a,

Borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> R
where R: 'a,

Mutably borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
where Self: Borrow<B>, B: 'a + ?Sized, R: 'a,

Borrows self, then passes self.borrow() into the pipe function. Read more
§

fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
where Self: BorrowMut<B>, B: 'a + ?Sized, R: 'a,

Mutably borrows self, then passes self.borrow_mut() into the pipe function. Read more
§

fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
where Self: AsRef<U>, U: 'a + ?Sized, R: 'a,

Borrows self, then passes self.as_ref() into the pipe function.
§

fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
where Self: AsMut<U>, U: 'a + ?Sized, R: 'a,

Mutably borrows self, then passes self.as_mut() into the pipe function.
§

fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
where Self: Deref<Target = T>, T: 'a + ?Sized, R: 'a,

Borrows self, then passes self.deref() into the pipe function.
§

fn pipe_deref_mut<'a, T, R>( &'a mut self, func: impl FnOnce(&'a mut T) -> R, ) -> R
where Self: DerefMut<Target = T> + Deref, T: 'a + ?Sized, R: 'a,

Mutably borrows self, then passes self.deref_mut() into the pipe function.
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
§

impl<T> Pointee for T

§

type Metadata = ()

The type for metadata in pointers and references to Self.
§

impl<T> Resolvable<T> for T
where T: Committable,

§

fn try_resolve(self) -> Result<T, T>

Get the underlying object if it is available without blocking.
§

fn commitment(&self) -> Commitment<T>

Get a commitment to the underlying object.
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
§

impl<T> Tap for T

§

fn tap(self, func: impl FnOnce(&Self)) -> Self

Immutable access to a value. Read more
§

fn tap_mut(self, func: impl FnOnce(&mut Self)) -> Self

Mutable access to a value. Read more
§

fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
where Self: Borrow<B>, B: ?Sized,

Immutable access to the Borrow<B> of a value. Read more
§

fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
where Self: BorrowMut<B>, B: ?Sized,

Mutable access to the BorrowMut<B> of a value. Read more
§

fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
where Self: AsRef<R>, R: ?Sized,

Immutable access to the AsRef<R> view of a value. Read more
§

fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
where Self: AsMut<R>, R: ?Sized,

Mutable access to the AsMut<R> view of a value. Read more
§

fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
where Self: Deref<Target = T>, T: ?Sized,

Immutable access to the Deref::Target of a value. Read more
§

fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
where Self: DerefMut<Target = T> + Deref, T: ?Sized,

Mutable access to the Deref::Target of a value. Read more
§

fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self

Calls .tap() only in debug builds, and is erased in release builds.
§

fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self

Calls .tap_mut() only in debug builds, and is erased in release builds.
§

fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
where Self: Borrow<B>, B: ?Sized,

Calls .tap_borrow() only in debug builds, and is erased in release builds.
§

fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
where Self: BorrowMut<B>, B: ?Sized,

Calls .tap_borrow_mut() only in debug builds, and is erased in release builds.
§

fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
where Self: AsRef<R>, R: ?Sized,

Calls .tap_ref() only in debug builds, and is erased in release builds.
§

fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
where Self: AsMut<R>, R: ?Sized,

Calls .tap_ref_mut() only in debug builds, and is erased in release builds.
§

fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
where Self: Deref<Target = T>, T: ?Sized,

Calls .tap_deref() only in debug builds, and is erased in release builds.
§

fn tap_deref_mut_dbg<T>(self, func: impl FnOnce(&mut T)) -> Self
where Self: DerefMut<Target = T> + Deref, T: ?Sized,

Calls .tap_deref_mut() only in debug builds, and is erased in release builds.
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
§

impl<T> TryConv for T

§

fn try_conv<T>(self) -> Result<T, Self::Error>
where Self: TryInto<T>,

Attempts to convert self into T using TryInto<T>. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
§

impl<'de, T> BorrowedRpcObject<'de> for T
where T: RpcBorrow<'de> + RpcSend,

Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

§

impl<T> Element for T
where T: Clone + Eq + PartialEq + Hash,

§

impl<T> Element for T
where T: Clone + Eq + PartialEq + Hash,

§

impl<T> ErasedDestructor for T
where T: 'static,

§

impl<T> JsonSchemaMaybe for T

§

impl<'de, T> RpcBorrow<'de> for T
where T: Deserialize<'de> + Debug + Send + Sync + Unpin,

§

impl<T> RpcObject for T
where T: RpcSend + RpcRecv,

§

impl<T> RpcRecv for T
where T: DeserializeOwned + Debug + Send + Sync + Unpin + 'static,

§

impl<T> RpcSend for T
where T: Serialize + Clone + Debug + Send + Sync + Unpin,

Source§

impl<TYPES, V> Voteable<TYPES> for V
where TYPES: NodeType, V: Sealed + Committable + Clone + Serialize + Debug + PartialEq + Hash + Eq,