Trait chaindexing::ContractState
source · 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, 'life3, 'async_trait>(
&'life0 self,
table_name: &'life1 str,
client: &'life2 ChaindexingRepoRawQueryTxnClient<'a>,
event: &'life3 Event
) -> 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,
'life3: 'async_trait { ... }
fn create<'a, 'life0, 'life1, 'async_trait, S>(
&'life0 self,
context: &'life1 EventHandlerContext<'_, S>
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where S: 'async_trait + Send + Sync + Clone,
Self: 'async_trait,
'a: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait { ... }
fn update<'a, 'life0, 'life1, 'async_trait, S>(
&'life0 self,
updates: HashMap<impl 'async_trait + AsRef<str> + Send, impl 'async_trait + AsRef<str> + Send>,
context: &'life1 EventHandlerContext<'_, S>
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where S: 'async_trait + Send + Sync + Clone,
Self: 'async_trait,
'a: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait { ... }
fn delete<'a, 'life0, 'life1, 'async_trait, S>(
&'life0 self,
context: &'life1 EventHandlerContext<'_, S>
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where S: 'async_trait + Send + Sync + Clone,
Self: 'async_trait,
'a: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait { ... }
fn read_one<'a, 'life0, 'async_trait, S>(
filters: HashMap<impl 'async_trait + AsRef<str> + Send, impl 'async_trait + AsRef<str> + Send>,
context: &'life0 EventHandlerContext<'_, S>
) -> Pin<Box<dyn Future<Output = Option<Self>> + Send + 'async_trait>>
where S: 'async_trait + Send + Sync + Clone,
Self: 'async_trait,
'a: 'async_trait,
'life0: 'async_trait { ... }
fn read_many<'a, 'life0, 'async_trait, S>(
filters: HashMap<impl 'async_trait + AsRef<str> + Send, impl 'async_trait + AsRef<str> + Send>,
context: &'life0 EventHandlerContext<'_, S>
) -> Pin<Box<dyn Future<Output = Vec<Self>> + Send + 'async_trait>>
where S: 'async_trait + Send + Sync + Clone,
Self: 'async_trait,
'a: 'async_trait,
'life0: 'async_trait { ... }
}Required Methods§
fn table_name() -> &'static str
Provided Methods§
fn to_view(&self) -> HashMap<String, String>
fn to_complete_view<'a, 'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
table_name: &'life1 str,
client: &'life2 ChaindexingRepoRawQueryTxnClient<'a>,
event: &'life3 Event
) -> 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,
'life3: 'async_trait,
fn create<'a, 'life0, 'life1, 'async_trait, S>( &'life0 self, context: &'life1 EventHandlerContext<'_, S> ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
fn update<'a, 'life0, 'life1, 'async_trait, S>( &'life0 self, updates: HashMap<impl 'async_trait + AsRef<str> + Send, impl 'async_trait + AsRef<str> + Send>, context: &'life1 EventHandlerContext<'_, S> ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
fn delete<'a, 'life0, 'life1, 'async_trait, S>( &'life0 self, context: &'life1 EventHandlerContext<'_, S> ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
fn read_one<'a, 'life0, 'async_trait, S>( filters: HashMap<impl 'async_trait + AsRef<str> + Send, impl 'async_trait + AsRef<str> + Send>, context: &'life0 EventHandlerContext<'_, S> ) -> Pin<Box<dyn Future<Output = Option<Self>> + Send + 'async_trait>>
fn read_many<'a, 'life0, 'async_trait, S>( filters: HashMap<impl 'async_trait + AsRef<str> + Send, impl 'async_trait + AsRef<str> + Send>, context: &'life0 EventHandlerContext<'_, S> ) -> Pin<Box<dyn Future<Output = Vec<Self>> + Send + 'async_trait>>
Object Safety§
This trait is not object safe.