#[non_exhaustive]pub enum HostResponse<T = WrappedState> {
ContractResponse(ContractResponse<T>),
DelegateResponse {
key: DelegateKey,
values: Vec<OutboundDelegateMsg>,
},
QueryResponse(QueryResponse),
Ok,
}
Expand description
A response to a previous ClientRequest
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.
ContractResponse(ContractResponse<T>)
DelegateResponse
QueryResponse(QueryResponse)
Ok
A requested action which doesn’t require an answer was performed successfully.
Implementations§
Source§impl HostResponse
impl HostResponse
pub fn unwrap_put(self) -> ContractKey
pub fn unwrap_get(self) -> (WrappedState, Option<ContractContainer>)
pub fn into_fbs_bytes(self) -> Result<Vec<u8>, Box<ClientError>>
Trait Implementations§
Source§impl<T: Debug> Debug for HostResponse<T>
impl<T: Debug> Debug for HostResponse<T>
Source§impl<'de, T> Deserialize<'de> for HostResponse<T>where
T: DeserializeOwned,
impl<'de, T> Deserialize<'de> for HostResponse<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 Display for HostResponse
impl Display for HostResponse
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 HostResponse<T>where
T: Freeze,
impl<T> RefUnwindSafe for HostResponse<T>where
T: RefUnwindSafe,
impl<T> Send for HostResponse<T>where
T: Send,
impl<T> Sync for HostResponse<T>where
T: Sync,
impl<T> Unpin for HostResponse<T>where
T: Unpin,
impl<T> UnwindSafe for HostResponse<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