DatastoreExt

Trait DatastoreExt 

Source
pub(crate) trait DatastoreExt<'a>: Copy {
    // Required methods
    fn reader<T>(self) -> Reader<'a, T>
       where T: Storable + 'static;
    fn exclusive_reader<T>(self) -> ExclusiveReader<'a, T>
       where T: Storable + 'static;
    fn writer<T>(self) -> Writer<'a, T>
       where T: Storable + 'static;
}

Required Methods§

Source

fn reader<T>(self) -> Reader<'a, T>
where T: Storable + 'static,

Returns the Reader for a specific slot.

§Panics
Source

fn exclusive_reader<T>(self) -> ExclusiveReader<'a, T>
where T: Storable + 'static,

Returns the ExclusiveReader for a specific slot.

Exclusivity of the reader is not guaranteed by this method and must be ensured via other means (e.g. crate::execute::validate_actors).

§Panics
Source

fn writer<T>(self) -> Writer<'a, T>
where T: Storable + 'static,

Returns the Writer for a specific slot.

§Panics
  • If the Writer for this slot has already been acquired.

  • If there is no Slot for T in the Datastore.

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<'a, S> DatastoreExt<'a> for Pin<&'a S>
where S: Datastore,

Source§

fn reader<T>(self) -> Reader<'a, T>
where T: Storable + 'static,

Source§

fn exclusive_reader<T>(self) -> ExclusiveReader<'a, T>
where T: Storable + 'static,

Source§

fn writer<T>(self) -> Writer<'a, T>
where T: Storable + 'static,

Implementors§