#[non_exhaustive]pub enum ContractResponse<T = WrappedState> {
GetResponse {
key: ContractKey,
contract: Option<ContractContainer>,
state: T,
},
PutResponse {
key: ContractKey,
},
UpdateNotification {
key: ContractKey,
update: UpdateData<'static>,
},
UpdateResponse {
key: ContractKey,
summary: StateSummary<'static>,
},
SubscribeResponse {
key: ContractKey,
subscribed: bool,
},
NotFound {
instance_id: ContractInstanceId,
},
}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.
GetResponse
PutResponse
Fields
§
key: ContractKeyUpdateNotification
Message sent when there is an update to a subscribed contract.
UpdateResponse
Successful update
SubscribeResponse
NotFound
Contract was not found after exhaustive search. This is an explicit response that distinguishes “contract doesn’t exist” from other failure modes like timeouts or network errors.
Fields
§
instance_id: ContractInstanceIdThe instance ID that was searched for.
Trait Implementations§
Source§impl<T: Clone> Clone for ContractResponse<T>
impl<T: Clone> Clone for ContractResponse<T>
Source§fn clone(&self) -> ContractResponse<T>
fn clone(&self) -> ContractResponse<T>
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<T: Debug> Debug for ContractResponse<T>
impl<T: Debug> Debug for ContractResponse<T>
Source§impl<'de, T> Deserialize<'de> for ContractResponse<T>where
T: DeserializeOwned,
impl<'de, T> Deserialize<'de> for ContractResponse<T>where
T: DeserializeOwned,
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<T> From<ContractResponse<T>> for HostResponse<T>
impl<T> From<ContractResponse<T>> for HostResponse<T>
Source§fn from(value: ContractResponse<T>) -> HostResponse<T>
fn from(value: ContractResponse<T>) -> HostResponse<T>
Converts to this type from the input type.
Auto Trait Implementations§
impl<T> Freeze for ContractResponse<T>where
T: Freeze,
impl<T> RefUnwindSafe for ContractResponse<T>where
T: RefUnwindSafe,
impl<T> Send for ContractResponse<T>where
T: Send,
impl<T> Sync for ContractResponse<T>where
T: Sync,
impl<T> Unpin for ContractResponse<T>where
T: Unpin,
impl<T> UnwindSafe for ContractResponse<T>where
T: UnwindSafe,
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