pub struct LeaseMachine { /* private fields */ }Implementations§
Source§impl LeaseMachine
impl LeaseMachine
pub fn new(cleanup_policy: CleanupPolicy, disconnect_grace_us: u64) -> Self
pub const fn state(&self) -> LeaseState
pub const fn revision(&self) -> u64
pub const fn resume_generation(&self) -> ResumeGeneration
pub fn begin_activation( &mut self, attempt_id: [u8; 16], client_nonce: [u8; 32], hello_bytes: &[u8], profile_fingerprint: [u8; 32], session_id: u64, server_nonce: [u8; 32], welcome: Vec<u8>, ) -> Result<AttemptDecision, LeaseTransitionError>
pub fn commit_welcome(&mut self) -> Result<(), LeaseTransitionError>
pub fn admit_post_hello(&mut self) -> Result<(), LeaseTransitionError>
pub fn confirm_transport_lost( &mut self, clean: bool, ) -> Result<LeaseState, LeaseTransitionError>
pub fn begin_resume( &mut self, expected_generation: ResumeGeneration, attempt_id: [u8; 16], client_nonce: [u8; 32], hello_bytes: &[u8], profile_fingerprint: [u8; 32], session_id: u64, server_nonce: [u8; 32], welcome: Vec<u8>, ) -> Result<AttemptDecision, LeaseTransitionError>
pub fn revoke(&mut self) -> Result<(), LeaseTransitionError>
pub fn expire(&mut self) -> Result<(), LeaseTransitionError>
Trait Implementations§
Source§impl Clone for LeaseMachine
impl Clone for LeaseMachine
Source§fn clone(&self) -> LeaseMachine
fn clone(&self) -> LeaseMachine
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 moreAuto Trait Implementations§
impl Freeze for LeaseMachine
impl RefUnwindSafe for LeaseMachine
impl Send for LeaseMachine
impl Sync for LeaseMachine
impl Unpin for LeaseMachine
impl UnsafeUnpin for LeaseMachine
impl UnwindSafe for LeaseMachine
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