Trait gdata::GStoreBackend

source ·
pub trait GStoreBackend: Sync + Send + Sized + Clone + 'static {
    // Required methods
    fn default_author(&self) -> AuthorId;
    fn get(
        &self,
        link: impl Into<Link>,
    ) -> impl Future<Output = Result<GStoreValue<Self>>>;
    fn get_idx(
        &self,
        link: impl Into<Link>,
        idx: u64,
    ) -> impl Future<Output = Result<GStoreValue<Self>>>;
    fn list(
        self,
        link: impl Into<Link>,
        recursive: bool,
    ) -> impl Future<Output = Result<impl Stream<Item = Result<GStoreValue<Self>>>>>;
    fn set_with_author(
        &self,
        link: impl Into<Link>,
        value: impl Into<Value>,
        author: AuthorId,
    ) -> impl Future<Output = Result<GStoreValue<Self>>>;
    fn del_with_author(
        &self,
        link: impl Into<Link>,
        author: AuthorId,
    ) -> impl Future<Output = Result<()>>;

    // Provided methods
    fn get_or_init_map(
        &self,
        link: impl Into<Link>,
    ) -> impl Future<Output = Result<GStoreValue<Self>>> { ... }
    fn get_or_init_map_with_author(
        &self,
        link: impl Into<Link>,
        author: AuthorId,
    ) -> impl Future<Output = Result<GStoreValue<Self>>> { ... }
    fn set(
        &self,
        link: impl Into<Link>,
        value: impl Into<Value>,
    ) -> impl Future<Output = Result<GStoreValue<Self>>> { ... }
    fn del(&self, link: impl Into<Link>) -> impl Future<Output = Result<()>> { ... }
}

Required Methods§

source

fn default_author(&self) -> AuthorId

source

fn get( &self, link: impl Into<Link>, ) -> impl Future<Output = Result<GStoreValue<Self>>>

source

fn get_idx( &self, link: impl Into<Link>, idx: u64, ) -> impl Future<Output = Result<GStoreValue<Self>>>

source

fn list( self, link: impl Into<Link>, recursive: bool, ) -> impl Future<Output = Result<impl Stream<Item = Result<GStoreValue<Self>>>>>

source

fn set_with_author( &self, link: impl Into<Link>, value: impl Into<Value>, author: AuthorId, ) -> impl Future<Output = Result<GStoreValue<Self>>>

source

fn del_with_author( &self, link: impl Into<Link>, author: AuthorId, ) -> impl Future<Output = Result<()>>

Provided Methods§

source

fn get_or_init_map( &self, link: impl Into<Link>, ) -> impl Future<Output = Result<GStoreValue<Self>>>

source

fn get_or_init_map_with_author( &self, link: impl Into<Link>, author: AuthorId, ) -> impl Future<Output = Result<GStoreValue<Self>>>

source

fn set( &self, link: impl Into<Link>, value: impl Into<Value>, ) -> impl Future<Output = Result<GStoreValue<Self>>>

source

fn del(&self, link: impl Into<Link>) -> impl Future<Output = Result<()>>

Object Safety§

This trait is not object safe.

Implementors§