pub enum Throttle {
Absolute(StorageSize),
Percent(u8),
}Expand description
Bandwidth throttle: absolute storage size or percentage of total bandwidth.
Parsed from .repo file values like "100M" (absolute) or "50%" (percentage).
§Examples
use dnf_repofile::Throttle;
let abs = Throttle::Absolute(dnf_repofile::StorageSize(1048576));
let pct = Throttle::Percent(50);Variants§
Absolute(StorageSize)
Absolute bandwidth limit in bytes.
Percent(u8)
Percentage of total available bandwidth.
Trait Implementations§
impl Copy for Throttle
impl Eq for Throttle
impl StructuralPartialEq for Throttle
Auto Trait Implementations§
impl Freeze for Throttle
impl RefUnwindSafe for Throttle
impl Send for Throttle
impl Sync for Throttle
impl Unpin for Throttle
impl UnsafeUnpin for Throttle
impl UnwindSafe for Throttle
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.