pub enum SecurityHeader {
Asymmetric(AsymmetricSecurityHeader),
Symmetric(SymmetricSecurityHeader),
}Expand description
Holds the security header associated with the chunk. Secure channel requests use an asymmetric security header, regular messages use a symmetric security header.
Variants§
Asymmetric(AsymmetricSecurityHeader)
Security header for asymmetric encryption.
Symmetric(SymmetricSecurityHeader)
Security header for symmetric encryption.
Implementations§
Source§impl SecurityHeader
impl SecurityHeader
Sourcepub fn decode_from_stream<S>(
stream: &mut S,
is_open_secure_channel: bool,
decoding_options: &DecodingOptions,
) -> Result<SecurityHeader, Error>
pub fn decode_from_stream<S>( stream: &mut S, is_open_secure_channel: bool, decoding_options: &DecodingOptions, ) -> Result<SecurityHeader, Error>
Decode the security header from a stream. The type of header is given by the message header, so this type doesn’t implement BinaryDecodable.
Trait Implementations§
Source§impl Clone for SecurityHeader
impl Clone for SecurityHeader
Source§fn clone(&self) -> SecurityHeader
fn clone(&self) -> SecurityHeader
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 Debug for SecurityHeader
impl Debug for SecurityHeader
Source§impl PartialEq for SecurityHeader
impl PartialEq for SecurityHeader
Source§impl SimpleBinaryEncodable for SecurityHeader
impl SimpleBinaryEncodable for SecurityHeader
impl StructuralPartialEq for SecurityHeader
Auto Trait Implementations§
impl Freeze for SecurityHeader
impl RefUnwindSafe for SecurityHeader
impl Send for SecurityHeader
impl Sync for SecurityHeader
impl Unpin for SecurityHeader
impl UnsafeUnpin for SecurityHeader
impl UnwindSafe for SecurityHeader
Blanket Implementations§
Source§impl<T> BinaryEncodable for Twhere
T: SimpleBinaryEncodable,
impl<T> BinaryEncodable for Twhere
T: SimpleBinaryEncodable,
Source§fn byte_len(&self, _ctx: &Context<'_>) -> usize
fn byte_len(&self, _ctx: &Context<'_>) -> usize
Returns the exact byte length of the structure as it would be if
encode were called.
This may be called prior to writing to ensure the correct amount of space is available.Source§fn encode<S>(&self, stream: &mut S, _ctx: &Context<'_>) -> Result<(), Error>
fn encode<S>(&self, stream: &mut S, _ctx: &Context<'_>) -> Result<(), Error>
Encodes the instance to the write stream.
Source§fn override_encoding(&self) -> Option<BuiltInDataEncoding>
fn override_encoding(&self) -> Option<BuiltInDataEncoding>
Override the extension object encoding used for this type.
This only makes sense if the type can only ever be encoded using a single
built-in encoding.
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