pub struct UnsubscribeContractRequest {
pub contract_id: ContractInstanceId,
pub context: DelegateContext,
pub processed: bool,
}Expand description
Request to stop receiving a contract’s state changes, from within a delegate.
The counterpart of SubscribeContractRequest. Before 0.10.0 a delegate had
no way to drop a subscription it had taken: the only release path was the
implicit cleanup when the delegate itself was unregistered, so a delegate
that had finished with a contract went on holding interest in it for as long
as the delegate existed. Specified in freenet-core#2830 alongside subscribe;
only subscribe was built.
Answered with InboundDelegateMsg::UnsubscribeContractResponse.
Field order is the wire format. Do not reorder.
Fields§
§contract_id: ContractInstanceIdThe contract to stop receiving notifications for.
context: DelegateContextContext for the delegate.
processed: boolWhether this request has been processed.
Implementations§
Source§impl UnsubscribeContractRequest
impl UnsubscribeContractRequest
pub fn new(contract_id: ContractInstanceId) -> Self
Trait Implementations§
Source§impl Clone for UnsubscribeContractRequest
impl Clone for UnsubscribeContractRequest
Source§fn clone(&self) -> UnsubscribeContractRequest
fn clone(&self) -> UnsubscribeContractRequest
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for UnsubscribeContractRequest
impl Debug for UnsubscribeContractRequest
Source§impl<'de> Deserialize<'de> for UnsubscribeContractRequest
impl<'de> Deserialize<'de> for UnsubscribeContractRequest
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 From<UnsubscribeContractRequest> for OutboundDelegateMsg
impl From<UnsubscribeContractRequest> for OutboundDelegateMsg
Source§fn from(req: UnsubscribeContractRequest) -> Self
fn from(req: UnsubscribeContractRequest) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for UnsubscribeContractRequest
impl RefUnwindSafe for UnsubscribeContractRequest
impl Send for UnsubscribeContractRequest
impl Sync for UnsubscribeContractRequest
impl Unpin for UnsubscribeContractRequest
impl UnsafeUnpin for UnsubscribeContractRequest
impl UnwindSafe for UnsubscribeContractRequest
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