[−][src]Struct hbbft::FaultLog
A structure used to contain reports of faulty node behavior.
Methods
impl<N, F> FaultLog<N, F> where
F: Fail,
[src]
F: Fail,
pub fn new() -> Self
[src]
Creates an empty FaultLog
.
pub fn init(node_id: N, kind: F) -> Self
[src]
Creates a new FaultLog
initialized with a single log.
pub fn append(&mut self, node_id: N, kind: F)
[src]
Creates a new Fault
and pushes it onto the fault log.
pub fn append_fault(&mut self, fault: Fault<N, F>)
[src]
Consumes a Fault
and pushes it onto the fault log.
pub fn extend(&mut self, new_logs: FaultLog<N, F>)
[src]
Consumes new_logs
, appending its logs onto the end of self
.
pub fn merge_into(self, logs: &mut FaultLog<N, F>)
[src]
Consumes self
, appending its logs onto the end of logs
.
pub fn is_empty(&self) -> bool
[src]
Returns true
if there are no fault entries in the log.
pub fn map<F2, FF>(self, f_fault: FF) -> FaultLog<N, F2> where
F2: Fail,
FF: Fn(F) -> F2,
[src]
F2: Fail,
FF: Fn(F) -> F2,
Applies f_fault
to each element in log, modifying its kind
only
Trait Implementations
impl<M, O, N, F> From<FaultLog<N, F>> for Step<M, O, N, F> where
F: Fail,
[src]
F: Fail,
impl<N, F> IntoIterator for FaultLog<N, F> where
F: Fail,
[src]
F: Fail,
type Item = Fault<N, F>
The type of the elements being iterated over.
type IntoIter = IntoIter<Fault<N, F>>
Which kind of iterator are we turning this into?
fn into_iter(self) -> Self::IntoIter
[src]
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, F> Default for FaultLog<N, F> where
F: Fail,
[src]
F: Fail,
impl<N: PartialEq, F: PartialEq + Fail> PartialEq<FaultLog<N, F>> for FaultLog<N, F>
[src]
impl<N: Debug, F: Debug + Fail> Debug for FaultLog<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<I> IntoIterator for I where
I: Iterator,
[src]
I: Iterator,
type Item = <I as Iterator>::Item
The type of the elements being iterated over.
type IntoIter = I
Which kind of iterator are we turning this into?
fn into_iter(self) -> I
[src]
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
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>,