Storable

Trait Storable 

Source
trait Storable<Types: NodeType>: Clone {
    // Required methods
    fn debug_name(&self) -> String;
    fn notify(
        &self,
        notifiers: &Notifiers<Types>,
    ) -> impl Send + Future<Output = ()>;
    fn store(
        &self,
        storage: &mut impl UpdateAvailabilityStorage<Types>,
        leaf_only: bool,
    ) -> impl Send + Future<Output = Result<()>>;
}
Expand description

An object which can be stored in the database.

Required Methods§

Source

fn debug_name(&self) -> String

The name of this object, for debugging purposes.

Source

fn notify( &self, notifiers: &Notifiers<Types>, ) -> impl Send + Future<Output = ()>

Notify anyone waiting for this object that it has become available.

Source

fn store( &self, storage: &mut impl UpdateAvailabilityStorage<Types>, leaf_only: bool, ) -> impl Send + Future<Output = Result<()>>

Store the object in the local database.

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.

Implementations on Foreign Types§

Source§

impl<Types> Storable<Types> for (VidCommonQueryData<Types>, Option<VidShare>)
where Types: NodeType,

Source§

fn debug_name(&self) -> String

Source§

async fn notify(&self, notifiers: &Notifiers<Types>)

Source§

async fn store( &self, storage: &mut impl UpdateAvailabilityStorage<Types>, _leaf_only: bool, ) -> Result<()>

Source§

impl<Types: NodeType> Storable<Types> for (LeafQueryData<Types>, Option<[CertificatePair<Types>; 2]>)

Source§

fn debug_name(&self) -> String

Source§

async fn notify(&self, notifiers: &Notifiers<Types>)

Source§

async fn store( &self, storage: &mut impl UpdateAvailabilityStorage<Types>, _leaf_only: bool, ) -> Result<()>

Implementors§

Source§

impl<Types> Storable<Types> for BlockQueryData<Types>
where Types: NodeType,

Source§

impl<Types> Storable<Types> for LeafQueryData<Types>
where Types: NodeType,

Source§

impl<Types> Storable<Types> for VidCommonQueryData<Types>
where Types: NodeType,

Source§

impl<Types> Storable<Types> for NonEmptyRange<BlockQueryData<Types>>
where Types: NodeType,

Source§

impl<Types> Storable<Types> for NonEmptyRange<LeafQueryData<Types>>
where Types: NodeType,

Source§

impl<Types> Storable<Types> for NonEmptyRange<VidCommonQueryData<Types>>
where Types: NodeType,