Skip to main content

SingularFetch

Trait SingularFetch 

Source
pub trait SingularFetch: Singular + Fetch {
    // Provided methods
    fn fetch_checked<'a>(&'a self) -> FailFuture<'a, Self::T>
       where Self: Sized + AsExtra<Extra: 'a + Send + Sync + ExtraFor<Self::T>>,
             Self::T: 'a + FullHash { ... }
    fn try_fetch_local_checked(&self) -> Result<Option<Self::T>>
       where Self: Sized + AsExtra<Extra: ExtraFor<Self::T>>,
             Self::T: FullHash { ... }
    fn fetch_checked_join<'a, E: 'a + Send + Sync + ExtraFor<Self::T>>(
        &'a self,
        extra: impl 'a + Send + Future<Output = Result<E>>,
    ) -> FailFuture<'a, Self::T>
       where Self: Sized,
             Self::T: 'a + FullHash { ... }
}

Provided Methods§

Source

fn fetch_checked<'a>(&'a self) -> FailFuture<'a, Self::T>
where Self: Sized + AsExtra<Extra: 'a + Send + Sync + ExtraFor<Self::T>>, Self::T: 'a + FullHash,

Source

fn try_fetch_local_checked(&self) -> Result<Option<Self::T>>
where Self: Sized + AsExtra<Extra: ExtraFor<Self::T>>, Self::T: FullHash,

Source

fn fetch_checked_join<'a, E: 'a + Send + Sync + ExtraFor<Self::T>>( &'a self, extra: impl 'a + Send + Future<Output = Result<E>>, ) -> FailFuture<'a, Self::T>
where Self: Sized, Self::T: 'a + FullHash,

Trait Implementations§

Source§

impl<T> InlineOutput for dyn SingularFetch<T = T> + '_

Source§

impl<T> ListHashes for dyn SingularFetch<T = T> + '_

Source§

fn list_hashes(&self, f: &mut (impl ?Sized + FnMut(Hash)))

[Hash]-only part of Topological::traverse.
Source§

fn point_count(&self) -> usize

How many others this object refers to.
Source§

fn topology_hash(&self) -> Hash

[Hash] of all [Hash]es the object refers to other objects by.
Source§

impl<T: Tagged> Tagged for dyn SingularFetch<T = T> + '_

Source§

const TAGS: Tags = T::TAGS

Source§

const HASH: Hash = T::HASH

Source§

impl<T> ToOutput for dyn SingularFetch<T = T> + '_

Source§

fn to_output(&self, output: &mut (impl ?Sized + Output))

Provide object’s byte representation to an Output.
Source§

fn hasher(&self) -> Sha256

Return a Sha256 hasher pre-filled with data of this object.
Source§

fn data_hash(&self) -> Hash

[Hash] of (real, i.e. serialized) data of this object.
Source§

fn mangle_hash(&self) -> Hash

“Mangle hash” of the object. This is used to introduce runtime distinction between data-identical objects similarly to compile-time Tagged::HASH.
Source§

fn output<T: FromOutput<Output: Default>>(&self) -> T

Construct an Output, possibly finalising it afterwards. Read more
Source§

fn vec(&self) -> Vec<u8>

Collect this object’s data (serialize the object).

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§