#[non_exhaustive]pub struct KmRefreshThresholds { /* private fields */ }Available on crate feature
crypto only.Expand description
KM Refresh packet-count thresholds (draft-sharabayko-srt-01 §6.1.6).
Implementations§
Source§impl KmRefreshThresholds
impl KmRefreshThresholds
Sourcepub const RECOMMENDED: KmRefreshThresholds
pub const RECOMMENDED: KmRefreshThresholds
The draft’s own recommended values (§6.1.6): 2^25 packets refresh
period, 4000 packets pre-announcement period.
Sourcepub fn new(
refresh_period: u64,
pre_announcement_period: u64,
) -> Result<Self, Error>
pub fn new( refresh_period: u64, pre_announcement_period: u64, ) -> Result<Self, Error>
Thresholds for refresh_period packets between switchovers and a
pre_announcement_period ahead of it.
§Errors
Error::InvalidField unless 0 < pre_announcement_period < refresh_period: a zero period would rotate on every packet, and a
pre-announcement at or past the refresh point would announce the next
key only once it had already replaced the current one.
Sourcepub const fn refresh_period(&self) -> u64
pub const fn refresh_period(&self) -> u64
Packets an active key is used for before switchover.
Sourcepub const fn pre_announcement_period(&self) -> u64
pub const fn pre_announcement_period(&self) -> u64
Packets before switchover the next key is announced, and after switchover the old key stays valid.
Trait Implementations§
Source§impl Clone for KmRefreshThresholds
impl Clone for KmRefreshThresholds
impl Copy for KmRefreshThresholds
Source§impl Debug for KmRefreshThresholds
impl Debug for KmRefreshThresholds
impl Eq for KmRefreshThresholds
Source§impl PartialEq for KmRefreshThresholds
impl PartialEq for KmRefreshThresholds
impl StructuralPartialEq for KmRefreshThresholds
Auto Trait Implementations§
impl Forget for KmRefreshThresholds
impl Freeze for KmRefreshThresholds
impl Move for KmRefreshThresholds
impl RefUnwindSafe for KmRefreshThresholds
impl Send for KmRefreshThresholds
impl Sync for KmRefreshThresholds
impl Unpin for KmRefreshThresholds
impl UnsafeUnpin for KmRefreshThresholds
impl UnwindSafe for KmRefreshThresholds
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