pub struct SFrameHeader;Expand description
SFrame Key ID helper, backed by sframe’s MlsKeyId (RFC 9605 §5.2).
Packs (epoch_lsb, member_index) into the Key ID that the sframe crate
carries in the RFC header, and unpacks it again on receipt.
Implementations§
Source§impl SFrameHeader
impl SFrameHeader
Sourcepub fn epoch_from_kid(kid: u64) -> u64
pub fn epoch_from_kid(kid: u64) -> u64
Extracts the epoch’s low EPOCH_BITS bits from a KID.
Sourcepub fn epoch_lsb(epoch: u64) -> u64
pub fn epoch_lsb(epoch: u64) -> u64
Reduces a full epoch to the low EPOCH_BITS bits stored in a KID, so
it can be compared against epoch_from_kid.
Sourcepub fn leaf_from_kid(kid: u64) -> u32
pub fn leaf_from_kid(kid: u64) -> u32
Extracts the sender’s leaf/member index from a KID.
Trait Implementations§
Source§impl Clone for SFrameHeader
impl Clone for SFrameHeader
Source§fn clone(&self) -> SFrameHeader
fn clone(&self) -> SFrameHeader
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 moreimpl Copy for SFrameHeader
Source§impl Debug for SFrameHeader
impl Debug for SFrameHeader
impl Eq for SFrameHeader
Source§impl PartialEq for SFrameHeader
impl PartialEq for SFrameHeader
impl StructuralPartialEq for SFrameHeader
Auto Trait Implementations§
impl Freeze for SFrameHeader
impl RefUnwindSafe for SFrameHeader
impl Send for SFrameHeader
impl Sync for SFrameHeader
impl Unpin for SFrameHeader
impl UnsafeUnpin for SFrameHeader
impl UnwindSafe for SFrameHeader
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Declassify for T
impl<T> Declassify for T
type Declassified = T
fn declassify(self) -> T
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more