pub enum MetadataExpire {
Duration(u64),
Never,
}Expand description
How long metadata is considered valid before a refresh is required.
Can be a specific duration in seconds, or Never to disable expiration.
§Examples
use dnf_repofile::MetadataExpire;
let expire = MetadataExpire::Duration(3600); // 1 hour
let never = MetadataExpire::Never;Variants§
Trait Implementations§
Source§impl Clone for MetadataExpire
impl Clone for MetadataExpire
Source§fn clone(&self) -> MetadataExpire
fn clone(&self) -> MetadataExpire
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 moreSource§impl Debug for MetadataExpire
impl Debug for MetadataExpire
Source§impl PartialEq for MetadataExpire
impl PartialEq for MetadataExpire
Source§fn eq(&self, other: &MetadataExpire) -> bool
fn eq(&self, other: &MetadataExpire) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Copy for MetadataExpire
impl Eq for MetadataExpire
impl StructuralPartialEq for MetadataExpire
Auto Trait Implementations§
impl Freeze for MetadataExpire
impl RefUnwindSafe for MetadataExpire
impl Send for MetadataExpire
impl Sync for MetadataExpire
impl Unpin for MetadataExpire
impl UnsafeUnpin for MetadataExpire
impl UnwindSafe for MetadataExpire
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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.