alloy_consensus

Trait Sealable

Source
pub trait Sealable: Sized {
    // Required method
    fn hash_slow(&self) -> FixedBytes<32>;

    // Provided methods
    fn seal_slow(self) -> Sealed<Self> { ... }
    fn seal_ref_slow(&self) -> Sealed<&Self> { ... }
    fn seal_unchecked(self, seal: FixedBytes<32>) -> Sealed<Self> { ... }
    fn seal_ref_unchecked(&self, seal: FixedBytes<32>) -> Sealed<&Self> { ... }
}
Expand description

Sealeable objects.

Required Methods§

Source

fn hash_slow(&self) -> FixedBytes<32>

Calculate the seal hash, this may be slow.

Provided Methods§

Source

fn seal_slow(self) -> Sealed<Self>

Seal the object by calculating the hash. This may be slow.

Source

fn seal_ref_slow(&self) -> Sealed<&Self>

Seal a borrowed object by calculating the hash. This may be slow.

Source

fn seal_unchecked(self, seal: FixedBytes<32>) -> Sealed<Self>

Instantiate an unchecked seal. This should be used with caution.

Source

fn seal_ref_unchecked(&self, seal: FixedBytes<32>) -> Sealed<&Self>

Instantiate an unchecked seal. This should be used with caution.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§