pub struct CustodyStats {Show 22 fields
pub held: u64,
pub held_bytes: u64,
pub accepted: u64,
pub delivered: u64,
pub re_originated: u64,
pub expired: u64,
pub duplicates: u64,
pub evicted: u64,
pub receipts_sent: u64,
pub receipts_dropped: u64,
pub receipts_received: u64,
pub receipts_ignored: u64,
pub refused_disabled: u64,
pub refused_no_request: u64,
pub refused_unknown_class: u64,
pub refused_not_sealed: u64,
pub refused_unproven_peer: u64,
pub refused_not_depositor: u64,
pub refused_stranger: u64,
pub refused_depositor_full: u64,
pub refused_store_full: u64,
pub refused_battery: u64,
}Expand description
What a custodian has done, and is holding.
A snapshot, safe to poll. held and held_bytes are gauges; everything
else is cumulative since start-up or the last erase. Aggregate and never per
depositor, because a per-depositor answer on any wire would be the quota
oracle the chapter refuses to be.
Fields§
§held: u64Frames in custody right now.
held_bytes: u64Bytes in custody right now.
accepted: u64Deposits accepted.
delivered: u64Held frames handed to their recipient directly, and released.
re_originated: u64Held frames re-originated toward a neighbour that is not the recipient.
expired: u64Held frames dropped at the end of their hold.
duplicates: u64Deposits of an identifier already held: not stored, not answered.
evicted: u64Held frames evicted to admit a newer deposit under drop-oldest.
receipts_sent: u64Receipts put on the arrival link.
receipts_dropped: u64Receipts not sent: the depositor does not parse them, the link was gone, or this device cannot sign.
receipts_received: u64Receipts this device received for an entry still in its outbox.
receipts_ignored: u64Receipts this device received naming nothing in its outbox, or that it could not parse.
refused_disabled: u64Refused: custody is off.
refused_no_request: u64Refused: no deposit request on the frame.
refused_unknown_class: u64Refused: unknown class token.
refused_not_sealed: u64Refused: not an __MLS_ENC__ frame.
refused_unproven_peer: u64Refused: the arrival link was not identified.
refused_not_depositor: u64Refused: the sender is not the arrival peer.
refused_stranger: u64Refused: a stranger while the stranger tier is closed.
refused_depositor_full: u64Refused: the depositor’s budget is full.
refused_store_full: u64Refused: the global budget is full.
refused_battery: u64Refused: the battery is below the relay floor.
Implementations§
Source§impl CustodyStats
impl CustodyStats
Sourcepub fn refusals(&self, refusal: CustodyRefusal) -> u64
pub fn refusals(&self, refusal: CustodyRefusal) -> u64
The counter a refusal reason lands in, for tests that walk the table.
Trait Implementations§
Source§impl Clone for CustodyStats
impl Clone for CustodyStats
Source§impl Debug for CustodyStats
impl Debug for CustodyStats
Source§impl Default for CustodyStats
impl Default for CustodyStats
impl Eq for CustodyStats
Source§impl PartialEq for CustodyStats
impl PartialEq for CustodyStats
impl StructuralPartialEq for CustodyStats
Auto Trait Implementations§
impl Freeze for CustodyStats
impl RefUnwindSafe for CustodyStats
impl Send for CustodyStats
impl Sync for CustodyStats
impl Unpin for CustodyStats
impl UnsafeUnpin for CustodyStats
impl UnwindSafe for CustodyStats
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Declassify for T
impl<T> Declassify for T
type Declassified = T
fn declassify(self) -> T
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.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Paint for Twhere
T: ?Sized,
impl<T> Paint for Twhere
T: ?Sized,
Source§fn fg(&self, value: Color) -> Painted<&T>
fn fg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self with the foreground set to
value.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like red() and
green(), which have the same functionality but are
pithier.
§Example
Set foreground color to white using fg():
use yansi::{Paint, Color};
painted.fg(Color::White);Set foreground color to white using white().
use yansi::Paint;
painted.white();Source§fn bright_black(&self) -> Painted<&T>
fn bright_black(&self) -> Painted<&T>
Source§fn bright_red(&self) -> Painted<&T>
fn bright_red(&self) -> Painted<&T>
Source§fn bright_green(&self) -> Painted<&T>
fn bright_green(&self) -> Painted<&T>
Source§fn bright_yellow(&self) -> Painted<&T>
fn bright_yellow(&self) -> Painted<&T>
Source§fn bright_blue(&self) -> Painted<&T>
fn bright_blue(&self) -> Painted<&T>
Source§fn bright_magenta(&self) -> Painted<&T>
fn bright_magenta(&self) -> Painted<&T>
Source§fn bright_cyan(&self) -> Painted<&T>
fn bright_cyan(&self) -> Painted<&T>
Source§fn bright_white(&self) -> Painted<&T>
fn bright_white(&self) -> Painted<&T>
Source§fn bg(&self, value: Color) -> Painted<&T>
fn bg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self with the background set to
value.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like on_red() and
on_green(), which have the same functionality but
are pithier.
§Example
Set background color to red using fg():
use yansi::{Paint, Color};
painted.bg(Color::Red);Set background color to red using on_red().
use yansi::Paint;
painted.on_red();Source§fn on_primary(&self) -> Painted<&T>
fn on_primary(&self) -> Painted<&T>
Source§fn on_magenta(&self) -> Painted<&T>
fn on_magenta(&self) -> Painted<&T>
Source§fn on_bright_black(&self) -> Painted<&T>
fn on_bright_black(&self) -> Painted<&T>
Source§fn on_bright_red(&self) -> Painted<&T>
fn on_bright_red(&self) -> Painted<&T>
Source§fn on_bright_green(&self) -> Painted<&T>
fn on_bright_green(&self) -> Painted<&T>
Source§fn on_bright_yellow(&self) -> Painted<&T>
fn on_bright_yellow(&self) -> Painted<&T>
Source§fn on_bright_blue(&self) -> Painted<&T>
fn on_bright_blue(&self) -> Painted<&T>
Source§fn on_bright_magenta(&self) -> Painted<&T>
fn on_bright_magenta(&self) -> Painted<&T>
Source§fn on_bright_cyan(&self) -> Painted<&T>
fn on_bright_cyan(&self) -> Painted<&T>
Source§fn on_bright_white(&self) -> Painted<&T>
fn on_bright_white(&self) -> Painted<&T>
Source§fn attr(&self, value: Attribute) -> Painted<&T>
fn attr(&self, value: Attribute) -> Painted<&T>
Enables the styling Attribute value.
This method should be used rarely. Instead, prefer to use
attribute-specific builder methods like bold() and
underline(), which have the same functionality
but are pithier.
§Example
Make text bold using attr():
use yansi::{Paint, Attribute};
painted.attr(Attribute::Bold);Make text bold using using bold().
use yansi::Paint;
painted.bold();Source§fn rapid_blink(&self) -> Painted<&T>
fn rapid_blink(&self) -> Painted<&T>
Source§fn quirk(&self, value: Quirk) -> Painted<&T>
fn quirk(&self, value: Quirk) -> Painted<&T>
Enables the yansi Quirk value.
This method should be used rarely. Instead, prefer to use quirk-specific
builder methods like mask() and
wrap(), which have the same functionality but are
pithier.
§Example
Enable wrapping using .quirk():
use yansi::{Paint, Quirk};
painted.quirk(Quirk::Wrap);Enable wrapping using wrap().
use yansi::Paint;
painted.wrap();Source§fn clear(&self) -> Painted<&T>
👎Deprecated since 1.0.1: renamed to resetting() due to conflicts with Vec::clear().
The clear() method will be removed in a future release.
fn clear(&self) -> Painted<&T>
renamed to resetting() due to conflicts with Vec::clear().
The clear() method will be removed in a future release.
Source§fn whenever(&self, value: Condition) -> Painted<&T>
fn whenever(&self, value: Condition) -> Painted<&T>
Conditionally enable styling based on whether the Condition value
applies. Replaces any previous condition.
See the crate level docs for more details.
§Example
Enable styling painted only when both stdout and stderr are TTYs:
use yansi::{Paint, Condition};
painted.red().on_yellow().whenever(Condition::STDOUTERR_ARE_TTY);