pub struct Key {
pub rid: u32,
pub prekey: bool,
pub data: Vec<u8>,
}
Expand description
Part of the OMEMO element header
Fields§
§rid: u32
The device id this key is encrypted for.
prekey: bool
The key element MUST be tagged with a prekey attribute set to true if a PreKeySignalMessage is being used.
data: Vec<u8>
The 16 bytes key and the GCM authentication tag concatenated together and encrypted using the corresponding long-standing SignalProtocol session
Trait Implementations§
Source§impl AsXml for Key
impl AsXml for Key
Source§impl FromXml for Key
impl FromXml for Key
Source§fn from_events(
name: QName,
attrs: AttrMap,
ctx: &Context<'_>,
) -> Result<Self::Builder, FromEventsError>
fn from_events( name: QName, attrs: AttrMap, ctx: &Context<'_>, ) -> Result<Self::Builder, FromEventsError>
Attempt to initiate the streamed construction of this struct from XML. Read more
Source§fn xml_name_matcher() -> XmlNameMatcher<'static>
fn xml_name_matcher() -> XmlNameMatcher<'static>
Return a predicate which determines if
Self
may be parsed from
a given XML element. Read moreSource§impl TryFrom<Element> for Key
impl TryFrom<Element> for Key
Source§type Error = FromElementError
type Error = FromElementError
The type returned in the event of a conversion error.
impl StructuralPartialEq for Key
Auto Trait Implementations§
impl Freeze for Key
impl RefUnwindSafe for Key
impl Send for Key
impl Sync for Key
impl Unpin for Key
impl UnwindSafe for Key
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