Struct sc_peerset::ReputationChange
source · [−]Expand description
Description of a reputation adjustment for a node.
Fields
value: i32
Reputation delta.
reason: &'static str
Reason for reputation change.
Implementations
sourceimpl ReputationChange
impl ReputationChange
sourcepub const fn new(value: i32, reason: &'static str) -> ReputationChange
pub const fn new(value: i32, reason: &'static str) -> ReputationChange
New reputation change with given delta and reason.
sourcepub const fn new_fatal(reason: &'static str) -> ReputationChange
pub const fn new_fatal(reason: &'static str) -> ReputationChange
New reputation change that forces minimum possible reputation.
Trait Implementations
sourceimpl Clone for ReputationChange
impl Clone for ReputationChange
sourcefn clone(&self) -> ReputationChange
fn clone(&self) -> ReputationChange
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 ReputationChange
impl Debug for ReputationChange
sourceimpl PartialEq<ReputationChange> for ReputationChange
impl PartialEq<ReputationChange> for ReputationChange
sourcefn eq(&self, other: &ReputationChange) -> bool
fn eq(&self, other: &ReputationChange) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &ReputationChange) -> bool
fn ne(&self, other: &ReputationChange) -> bool
This method tests for !=
.
impl Copy for ReputationChange
impl Eq for ReputationChange
impl StructuralEq for ReputationChange
impl StructuralPartialEq for ReputationChange
Auto Trait Implementations
impl RefUnwindSafe for ReputationChange
impl Send for ReputationChange
impl Sync for ReputationChange
impl Unpin for ReputationChange
impl UnwindSafe for ReputationChange
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub 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.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub 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