#[non_exhaustive]pub enum ContractRequest<'a> {
Put {
contract: ContractContainer,
state: WrappedState,
related_contracts: RelatedContracts<'a>,
subscribe: bool,
},
Update {
key: ContractKey,
data: UpdateData<'a>,
},
Get {
key: ContractKey,
return_contract_code: bool,
subscribe: bool,
},
Subscribe {
key: ContractKey,
summary: Option<StateSummary<'a>>,
},
}
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Put
Insert a new value in a contract corresponding with the provided key.
Fields
§
contract: ContractContainer
§
state: WrappedState
Value to upsert in the contract.
Related contracts.
Update
Update an existing contract corresponding with the provided key.
Get
Fetch the current state from a contract corresponding to the provided key.
Fields
§
key: ContractKey
Key of the contract.
Subscribe
Subscribe to the changes in a given contract. Implicitly starts a get operation if the contract is not present yet.
Implementations§
Source§impl ContractRequest<'_>
impl ContractRequest<'_>
pub fn into_owned(self) -> ContractRequest<'static>
Trait Implementations§
Source§impl<'a> Clone for ContractRequest<'a>
impl<'a> Clone for ContractRequest<'a>
Source§fn clone(&self) -> ContractRequest<'a>
fn clone(&self) -> ContractRequest<'a>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<'a> Debug for ContractRequest<'a>
impl<'a> Debug for ContractRequest<'a>
Source§impl<'de: 'a, 'a> Deserialize<'de> for ContractRequest<'a>
impl<'de: 'a, 'a> Deserialize<'de> for ContractRequest<'a>
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl<'a> From<ContractRequest<'a>> for ClientRequest<'a>
impl<'a> From<ContractRequest<'a>> for ClientRequest<'a>
Source§fn from(op: ContractRequest<'a>) -> Self
fn from(op: ContractRequest<'a>) -> Self
Converts to this type from the input type.
Source§impl<'a> PartialEq for ContractRequest<'a>
impl<'a> PartialEq for ContractRequest<'a>
Source§impl<'a> Serialize for ContractRequest<'a>
impl<'a> Serialize for ContractRequest<'a>
impl<'a> Eq for ContractRequest<'a>
impl<'a> StructuralPartialEq for ContractRequest<'a>
Auto Trait Implementations§
impl<'a> Freeze for ContractRequest<'a>
impl<'a> RefUnwindSafe for ContractRequest<'a>
impl<'a> Send for ContractRequest<'a>
impl<'a> Sync for ContractRequest<'a>
impl<'a> Unpin for ContractRequest<'a>
impl<'a> UnwindSafe for ContractRequest<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more