pub struct WriteLeaseToken { /* private fields */ }Expand description
A generation-scoped Controller write lease token.
The token deliberately excludes an expiry timestamp. A Broker converts the Controller-provided duration into a process-local monotonic deadline before installing it in Store.
Implementations§
Source§impl WriteLeaseToken
impl WriteLeaseToken
Sourcepub fn try_new(
authority: WriteAuthority,
generation: u64,
) -> Result<Self, StoreContractViolation>
pub fn try_new( authority: WriteAuthority, generation: u64, ) -> Result<Self, StoreContractViolation>
Creates a token for a non-zero Controller lease generation.
§Errors
Returns StoreContractViolation::HaInvalidLeaseGeneration when generation is zero.
Returns the Controller authority carried by this lease.
Sourcepub const fn generation(self) -> u64
pub const fn generation(self) -> u64
Returns the monotonically increasing lease generation.
Trait Implementations§
Source§impl Clone for WriteLeaseToken
impl Clone for WriteLeaseToken
impl Copy for WriteLeaseToken
Source§impl Debug for WriteLeaseToken
impl Debug for WriteLeaseToken
impl Eq for WriteLeaseToken
Source§impl Hash for WriteLeaseToken
impl Hash for WriteLeaseToken
Source§impl PartialEq for WriteLeaseToken
impl PartialEq for WriteLeaseToken
impl StructuralPartialEq for WriteLeaseToken
Auto Trait Implementations§
impl Forget for WriteLeaseToken
impl Freeze for WriteLeaseToken
impl Move for WriteLeaseToken
impl RefUnwindSafe for WriteLeaseToken
impl Send for WriteLeaseToken
impl Sync for WriteLeaseToken
impl Unpin for WriteLeaseToken
impl UnsafeUnpin for WriteLeaseToken
impl UnwindSafe for WriteLeaseToken
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