Struct alloy_consensus::sealed::Sealed
source · pub struct Sealed<T> {
inner: T,
seal: B256,
}
Expand description
A consensus hashable item, with its memoized hash.
We do not implement
Fields§
§inner: T
The inner item
seal: B256
Its hash.
Implementations§
source§impl<T> Sealed<T>
impl<T> Sealed<T>
sourcepub const fn new_unchecked(inner: T, seal: B256) -> Self
pub const fn new_unchecked(inner: T, seal: B256) -> Self
Instantiate without performing the hash. This should be used carefully.
sourcepub fn into_parts(self) -> (T, B256)
pub fn into_parts(self) -> (T, B256)
Decompose into parts.
sourcepub const fn hash(&self) -> B256
pub const fn hash(&self) -> B256
Geth the hash (alias for Self::seal
).
Trait Implementations§
source§impl<T: PartialEq> PartialEq for Sealed<T>
impl<T: PartialEq> PartialEq for Sealed<T>
impl<T: Copy> Copy for Sealed<T>
impl<T: Eq> Eq for Sealed<T>
impl<T> StructuralPartialEq for Sealed<T>
Auto Trait Implementations§
impl<T> Freeze for Sealed<T>where
T: Freeze,
impl<T> RefUnwindSafe for Sealed<T>where
T: RefUnwindSafe,
impl<T> Send for Sealed<T>where
T: Send,
impl<T> Sync for Sealed<T>where
T: Sync,
impl<T> Unpin for Sealed<T>where
T: Unpin,
impl<T> UnwindSafe for Sealed<T>where
T: UnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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 moreLayout§
Note: Unable to compute type layout, possibly due to this type having generic parameters. Layout can only be computed for concrete, fully-instantiated types.