pub trait ContractState: DeserializeOwned + Serialize + Clone + Debug + Sync + Send + 'static {
    // Required method
    fn table_name() -> &'static str;

    // Provided methods
    fn to_view(&self) -> HashMap<String, String> { ... }
    fn to_complete_view<'a, 'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        table_name: &'life1 str,
        client: &'life2 ChaindexingRepoRawQueryTxnClient<'a>
    ) -> Pin<Box<dyn Future<Output = HashMap<String, String>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'a: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait { ... }
    fn create<'a, 'life0, 'life1, 'async_trait>(
        &'life0 self,
        context: &'life1 EventHandlerContext<'_>
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
       where Self: 'async_trait,
             'a: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait { ... }
    fn update<'a, 'life0, 'life1, 'async_trait>(
        &'life0 self,
        updates: HashMap<String, String>,
        context: &'life1 EventHandlerContext<'_>
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
       where Self: 'async_trait,
             'a: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait { ... }
    fn delete<'a, 'life0, 'life1, 'async_trait>(
        &'life0 self,
        context: &'life1 EventHandlerContext<'_>
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
       where Self: 'async_trait,
             'a: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait { ... }
    fn read_one<'a, 'life0, 'async_trait>(
        filters: HashMap<String, String>,
        context: &'life0 EventHandlerContext<'_>
    ) -> Pin<Box<dyn Future<Output = Option<Self>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'a: 'async_trait,
             'life0: 'async_trait { ... }
    fn read_many<'a, 'life0, 'async_trait>(
        filters: HashMap<String, String>,
        context: &'life0 EventHandlerContext<'_>
    ) -> Pin<Box<dyn Future<Output = Vec<Self>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'a: 'async_trait,
             'life0: 'async_trait { ... }
    fn get_state_fields<'a, 'life0, 'async_trait>(
        client: &'life0 ChaindexingRepoRawQueryTxnClient<'a>
    ) -> Pin<Box<dyn Future<Output = Option<Vec<String>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'a: 'async_trait,
             'life0: 'async_trait { ... }
    fn get_fields(&self) -> Vec<String> { ... }
    fn get_random_state<'a, 'life0, 'async_trait>(
        client: &'life0 ChaindexingRepoRawQueryTxnClient<'a>
    ) -> Pin<Box<dyn Future<Output = Option<Self>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'a: 'async_trait,
             'life0: 'async_trait { ... }
}

Required Methods§

source

fn table_name() -> &'static str

Provided Methods§

source

fn to_view(&self) -> HashMap<String, String>

source

fn to_complete_view<'a, 'life0, 'life1, 'life2, 'async_trait>( &'life0 self, table_name: &'life1 str, client: &'life2 ChaindexingRepoRawQueryTxnClient<'a> ) -> Pin<Box<dyn Future<Output = HashMap<String, String>> + Send + 'async_trait>>
where Self: 'async_trait, 'a: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

source

fn create<'a, 'life0, 'life1, 'async_trait>( &'life0 self, context: &'life1 EventHandlerContext<'_> ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait, 'a: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

source

fn update<'a, 'life0, 'life1, 'async_trait>( &'life0 self, updates: HashMap<String, String>, context: &'life1 EventHandlerContext<'_> ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait, 'a: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

source

fn delete<'a, 'life0, 'life1, 'async_trait>( &'life0 self, context: &'life1 EventHandlerContext<'_> ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait, 'a: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

source

fn read_one<'a, 'life0, 'async_trait>( filters: HashMap<String, String>, context: &'life0 EventHandlerContext<'_> ) -> Pin<Box<dyn Future<Output = Option<Self>> + Send + 'async_trait>>
where Self: 'async_trait, 'a: 'async_trait, 'life0: 'async_trait,

source

fn read_many<'a, 'life0, 'async_trait>( filters: HashMap<String, String>, context: &'life0 EventHandlerContext<'_> ) -> Pin<Box<dyn Future<Output = Vec<Self>> + Send + 'async_trait>>
where Self: 'async_trait, 'a: 'async_trait, 'life0: 'async_trait,

source

fn get_state_fields<'a, 'life0, 'async_trait>( client: &'life0 ChaindexingRepoRawQueryTxnClient<'a> ) -> Pin<Box<dyn Future<Output = Option<Vec<String>>> + Send + 'async_trait>>
where Self: 'async_trait, 'a: 'async_trait, 'life0: 'async_trait,

source

fn get_fields(&self) -> Vec<String>

source

fn get_random_state<'a, 'life0, 'async_trait>( client: &'life0 ChaindexingRepoRawQueryTxnClient<'a> ) -> Pin<Box<dyn Future<Output = Option<Self>> + Send + 'async_trait>>
where Self: 'async_trait, 'a: 'async_trait, 'life0: 'async_trait,

Object Safety§

This trait is not object safe.

Implementors§