pub struct DiskFloor {
pub percent: u8,
pub bytes: u64,
}Expand description
How much must stay free, as a percentage of the filesystem and as an absolute byte count; the larger of the two is the floor.
Fields§
§percent: u8Percent of f_blocks that must remain available. 0 disables the
percentage term.
bytes: u64Bytes that must remain available. 0 disables the absolute term.
Implementations§
Source§impl DiskFloor
impl DiskFloor
Sourcepub fn parse(spec: &str) -> Result<DiskFloor, String>
pub fn parse(spec: &str) -> Result<DiskFloor, String>
--disk-floor’s grammar. A comma-separated list of terms, each
either a percentage (5%) or a byte count with a unit (2GiB, 500M,
1T, 4096); the larger of the two kinds wins at measurement time. A
term of one kind replaces the default of that kind, so --disk-floor 10% keeps the 2 GiB absolute floor and --disk-floor 0%,512MiB is a
pure byte floor. 0 on both is refused by name: a gate that can never
refuse is not a gate, and an operator who wants none should not have
one that merely looks like one.
Trait Implementations§
impl Copy for DiskFloor
impl Eq for DiskFloor
impl StructuralPartialEq for DiskFloor
Auto Trait Implementations§
impl Freeze for DiskFloor
impl RefUnwindSafe for DiskFloor
impl Send for DiskFloor
impl Sync for DiskFloor
impl Unpin for DiskFloor
impl UnsafeUnpin for DiskFloor
impl UnwindSafe for DiskFloor
Blanket Implementations§
impl<T> Allocation for T
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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
key and return true if they are equal.