[−][src]Struct hbbft::Fault
A structure representing the context of a faulty node. This structure
describes which node is faulty (node_id
) and which faulty behavior
that the node exhibited ('kind').
Fields
node_id: N
The faulty node's ID.
kind: F
The kind of fault the node is blamed for.
Methods
impl<N, F> Fault<N, F> where
F: Fail,
[src]
F: Fail,
pub fn new(node_id: N, kind: F) -> Self
[src]
Creates a new fault, blaming node_id
for the kind
.
pub fn map<F2, FF>(self, f_fault: FF) -> Fault<N, F2> where
F2: Fail,
FF: Fn(F) -> F2,
[src]
F2: Fail,
FF: Fn(F) -> F2,
Applies f_fault
to kind
, leaves node_id
unchanged
Trait Implementations
impl<M, O, N, F> From<Fault<N, F>> for Step<M, O, N, F> where
F: Fail,
[src]
F: Fail,
impl<N, F> Into<FaultLog<N, F>> for Fault<N, F> where
F: Fail,
[src]
F: Fail,
Creates a new FaultLog
where self
is the first element in the log
vector.
impl<N: PartialEq, F: PartialEq + Fail> PartialEq<Fault<N, F>> for Fault<N, F>
[src]
impl<N: Clone, F: Clone + Fail> Clone for Fault<N, F>
[src]
fn clone(&self) -> Fault<N, F>
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl<N: Debug, F: Debug + Fail> Debug for Fault<N, F>
[src]
impl<N, F> FromIterator<Fault<N, F>> for FaultLog<N, F> where
F: Fail,
[src]
F: Fail,
fn from_iter<I: IntoIterator<Item = Fault<N, F>>>(iter: I) -> Self
[src]
Auto Trait Implementations
Blanket Implementations
impl<T> From for T
[src]
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,