Trait tinychain::gateway::Client

source ·
pub trait Client {
    // Required methods
    fn fetch<'life0, 'life1, 'life2, 'life3, 'async_trait, T>(
        &'life0 self,
        txn_id: &'life1 TxnId,
        link: ToUrl<'life2>,
        key: &'life3 Value
    ) -> Pin<Box<dyn Future<Output = TCResult<T>> + Send + 'async_trait>>
       where T: FromStream<Context = ()> + 'async_trait,
             Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait,
             'life3: 'async_trait;
    fn get<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        txn: &'life1 Txn,
        link: ToUrl<'life2>,
        key: Value
    ) -> Pin<Box<dyn Future<Output = TCResult<State>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
    fn put<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        txn: &'life1 Txn,
        link: ToUrl<'life2>,
        key: Value,
        value: State
    ) -> Pin<Box<dyn Future<Output = TCResult<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
    fn post<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        txn: &'life1 Txn,
        link: ToUrl<'life2>,
        params: State
    ) -> Pin<Box<dyn Future<Output = TCResult<State>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
    fn delete<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        txn: &'life1 Txn,
        link: ToUrl<'life2>,
        key: Value
    ) -> Pin<Box<dyn Future<Output = TCResult<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
}
Expand description

A client used by Gateway

Required Methods§

source

fn fetch<'life0, 'life1, 'life2, 'life3, 'async_trait, T>( &'life0 self, txn_id: &'life1 TxnId, link: ToUrl<'life2>, key: &'life3 Value ) -> Pin<Box<dyn Future<Output = TCResult<T>> + Send + 'async_trait>>
where T: FromStream<Context = ()> + 'async_trait, Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

Read a simple value.

source

fn get<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, txn: &'life1 Txn, link: ToUrl<'life2>, key: Value ) -> Pin<Box<dyn Future<Output = TCResult<State>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Read a State.

source

fn put<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, txn: &'life1 Txn, link: ToUrl<'life2>, key: Value, value: State ) -> Pin<Box<dyn Future<Output = TCResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Set key = value within the state referred to by link.

source

fn post<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, txn: &'life1 Txn, link: ToUrl<'life2>, params: State ) -> Pin<Box<dyn Future<Output = TCResult<State>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Execute a remote POST op.

source

fn delete<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, txn: &'life1 Txn, link: ToUrl<'life2>, key: Value ) -> Pin<Box<dyn Future<Output = TCResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Delete key from the state referred to by link.

Object Safety§

This trait is not object safe.

Implementors§