pub struct ValkeyTimeToLive { /* private fields */ }Expand description
Positive, bounded key expiration interval.
Implementations§
Source§impl ValkeyTimeToLive
impl ValkeyTimeToLive
Sourcepub fn new(value: Duration) -> ValkeyResult<Self>
pub fn new(value: Duration) -> ValkeyResult<Self>
Constructs a TTL from a duration.
Sourcepub const fn milliseconds(self) -> u64
pub const fn milliseconds(self) -> u64
Returns the TTL in whole milliseconds.
Trait Implementations§
Source§impl Clone for ValkeyTimeToLive
impl Clone for ValkeyTimeToLive
Source§fn clone(&self) -> ValkeyTimeToLive
fn clone(&self) -> ValkeyTimeToLive
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 ValkeyTimeToLive
Source§impl Debug for ValkeyTimeToLive
impl Debug for ValkeyTimeToLive
impl Eq for ValkeyTimeToLive
Source§impl PartialEq for ValkeyTimeToLive
impl PartialEq for ValkeyTimeToLive
impl StructuralPartialEq for ValkeyTimeToLive
Auto Trait Implementations§
impl Freeze for ValkeyTimeToLive
impl RefUnwindSafe for ValkeyTimeToLive
impl Send for ValkeyTimeToLive
impl Sync for ValkeyTimeToLive
impl Unpin for ValkeyTimeToLive
impl UnsafeUnpin for ValkeyTimeToLive
impl UnwindSafe for ValkeyTimeToLive
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