Enum tor_netdoc::doc::netstatus::RelayWeight
source · [−]Expand description
Recognized weight fields on a single relay in a consensus
Variants (Non-exhaustive)
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Unmeasured(u32)
An unmeasured weight for a relay.
Measured(u32)
An measured weight for a relay.
Implementations
sourceimpl RelayWeight
impl RelayWeight
sourcepub fn is_measured(&self) -> bool
pub fn is_measured(&self) -> bool
Return true if this weight is the result of a successful measurement
sourcepub fn is_nonzero(&self) -> bool
pub fn is_nonzero(&self) -> bool
Return true if this weight is nonzero
Trait Implementations
sourceimpl Clone for RelayWeight
impl Clone for RelayWeight
sourcefn clone(&self) -> RelayWeight
fn clone(&self) -> RelayWeight
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for RelayWeight
impl Debug for RelayWeight
sourceimpl Default for RelayWeight
impl Default for RelayWeight
sourcefn default() -> RelayWeight
fn default() -> RelayWeight
Returns the “default value” for a type. Read more
impl Copy for RelayWeight
Auto Trait Implementations
impl RefUnwindSafe for RelayWeight
impl Send for RelayWeight
impl Sync for RelayWeight
impl Unpin for RelayWeight
impl UnwindSafe for RelayWeight
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more