Struct ruma::events::key::verification::cancel::CancelToDeviceEventContent [−][src]
pub struct CancelToDeviceEventContent {
pub transaction_id: String,
pub reason: String,
pub code: CancelCode,
}
events
only.Expand description
The payload for a to-device CancelEvent
.
Fields
transaction_id: String
The opaque identifier for the verification process/request.
reason: String
A human readable description of the code
.
The client should only rely on this string if it does not understand the code
.
code: CancelCode
The error code for why the process / request was cancelled by the user.
Implementations
pub fn new(
transaction_id: String,
reason: String,
code: CancelCode
) -> CancelToDeviceEventContent
pub fn new(
transaction_id: String,
reason: String,
code: CancelCode
) -> CancelToDeviceEventContent
Creates a new CancelToDeviceEventContent
with the given transaction ID, reason and code.
Trait Implementations
pub fn deserialize<__D>(
__deserializer: __D
) -> Result<CancelToDeviceEventContent, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
pub fn deserialize<__D>(
__deserializer: __D
) -> Result<CancelToDeviceEventContent, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
A matrix event identifier, like m.room.message
.
pub fn from_parts(
ev_type: &str,
content: &RawValue
) -> Result<CancelToDeviceEventContent, Error>
pub fn from_parts(
ev_type: &str,
content: &RawValue
) -> Result<CancelToDeviceEventContent, Error>
Constructs the given event content.
Performs the conversion.
pub fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
pub fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations
impl RefUnwindSafe for CancelToDeviceEventContent
impl Send for CancelToDeviceEventContent
impl Sync for CancelToDeviceEventContent
impl Unpin for CancelToDeviceEventContent
impl UnwindSafe for CancelToDeviceEventContent
Blanket Implementations
Mutably borrows from an owned value. Read more
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
type Output = T
type Output = T
Should always be Self
pub fn vzip(self) -> V
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more