pub struct FsSlack {
pub measured_permille: Option<u64>,
pub slack_permille: u64,
}Expand description
The filesystem’s slack as this data set’s ledger reserves it.
Fields§
§measured_permille: Option<u64>What a growing spool-sized file occupied beyond its bytes, ‰ of them, at worst — None
when it could not be measured.
slack_permille: u64What the ledger reserves on top of every copy, ‰: the measurement and
SLACK_MARGIN_PERMILLE, never under PUSH_FS_SLACK_PERMILLE;
UNMEASURED_SLACK_PERMILLE unmeasured.
Implementations§
Source§impl FsSlack
impl FsSlack
Sourcepub fn from_measured(measured_permille: Option<u64>) -> FsSlack
pub fn from_measured(measured_permille: Option<u64>) -> FsSlack
The slack from a measurement (None: not measured).
Sourcepub fn of(root: &Path) -> (FsSlack, Option<String>)
pub fn of(root: &Path) -> (FsSlack, Option<String>)
Measure root’s filesystem (measure_fs_slack) and say why when it cannot be.
Sourcepub fn reserve_permille(&self, copies: u64) -> u64
pub fn reserve_permille(&self, copies: u64) -> u64
What one wire byte of a transfer of copies copies is promised, ‰.
Trait Implementations§
impl Copy for FsSlack
impl Eq for FsSlack
impl StructuralPartialEq for FsSlack
Auto Trait Implementations§
impl Freeze for FsSlack
impl RefUnwindSafe for FsSlack
impl Send for FsSlack
impl Sync for FsSlack
impl Unpin for FsSlack
impl UnsafeUnpin for FsSlack
impl UnwindSafe for FsSlack
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
Mutably borrows from an owned value. Read more
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
Compare self to
key and return true if they are equal.