Enum brb::error::ValidationError[][src]

pub enum ValidationError<A: Actor<S> + 'static, S: Sig + 'static, V: Debug + Error + 'static> {
Show variants PacketSourceIsNotDot { from: A, dot: Dot<A>, }, MsgDotNotTheNextDot { msg_dot: Dot<A>, expected_dot: Dot<A>, }, SourceAlreadyHasPendingMsg { msg_dot: Dot<A>, next_deliver_dot: Dot<A>, }, MessageFromDifferentGeneration { msg_gen: Generation, gen: Generation, }, SourceIsNotVotingMember { from: A, members: BTreeSet<A>, }, DataTypeFailedValidation(V), InvalidSignature, SignedValidatedForPacketWeDidNotRequest, MsgDotNotNextDotToBeDelivered { msg_dot: Dot<A>, expected_dot: Dot<A>, }, NotEnoughSignaturesToFormQuorum, ProofContainsSignaturesFromNonMembers, ProofContainsInvalidSignatures, DeliveredForPacketWeDidNotInitiate, DeliveredForPacketWeAreNotWaitingOn, PhantomSig(PhantomData<S>),
}
Expand description

Enumerates types of packet validation errors.

Note that all of these errors are generated within the BRB module itself with the exception of DataTypeFailedValidation, which occurs when a BRBDataType validation fails according to its own internal logic.

Variants

PacketSourceIsNotDot

The actor who sent this packet is different from the actor who incremented the dot

Show fields

Fields of PacketSourceIsNotDot

from: A

actor who sent the packet

dot: Dot<A>

the associated dot

MsgDotNotTheNextDot

The dot in this message is out of order

Show fields

Fields of MsgDotNotTheNextDot

msg_dot: Dot<A>

dot of the message

expected_dot: Dot<A>

dot that was expected

SourceAlreadyHasPendingMsg

The source of this message already has a pending message, we can not start a new operation until the first one has completed

Show fields

Fields of SourceAlreadyHasPendingMsg

msg_dot: Dot<A>

dot of the message

next_deliver_dot: Dot<A>

dot of next delivery

MessageFromDifferentGeneration

This message is not from this generation

Show fields

Fields of MessageFromDifferentGeneration

msg_gen: Generation

generation of the message

gen: Generation

present generation

SourceIsNotVotingMember

Source is not a voting member

Show fields

Fields of SourceIsNotVotingMember

from: A

actor that proposed the action

members: BTreeSet<A>

voting members

DataTypeFailedValidation(V)

the datatype failed to validate the operation

InvalidSignature

Signature is invalid

SignedValidatedForPacketWeDidNotRequest

We received a SignedValidated packet for a message we did not request

MsgDotNotNextDotToBeDelivered

Message dot to be applied is not the next message to be delivered

Show fields

Fields of MsgDotNotNextDotToBeDelivered

msg_dot: Dot<A>

the dot in the msg

expected_dot: Dot<A>

the dot we are expecting

NotEnoughSignaturesToFormQuorum

The proof did not contain enough signatures to form quorum

ProofContainsSignaturesFromNonMembers

Proof contains signatures from non-members

ProofContainsInvalidSignatures

Proof contains invalid signatures

DeliveredForPacketWeDidNotInitiate

We received a Op::Delivered packet for a message we did not initiate. Only the initiator should receive these delivered packets.

DeliveredForPacketWeAreNotWaitingOn

We received an Op::Delivered packet for a message we are no longer waiting on. This can happen when we’ve already received a super-majority of Delivered packets and have cleared our local buffer.

PhantomSig(PhantomData<S>)

Phantom, unused.

Trait Implementations

impl<A: Debug + Actor<S> + 'static, S: Debug + Sig + 'static, V: Debug + Error + 'static> Debug for ValidationError<A, S, V>[src]

fn fmt(&self, f: &mut Formatter<'_>) -> Result[src]

Formats the value using the given formatter. Read more

impl<A: Actor<S> + 'static, S: Sig + 'static, V: Debug + Error + 'static> Display for ValidationError<A, S, V>[src]

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result[src]

Formats the value using the given formatter. Read more

impl<A: Actor<S> + 'static, S: Sig + 'static, V: Debug + Error + 'static> Error for ValidationError<A, S, V>[src]

fn source(&self) -> Option<&(dyn Error + 'static)>1.30.0[src]

The lower-level source of this error, if any. Read more

fn backtrace(&self) -> Option<&Backtrace>[src]

🔬 This is a nightly-only experimental API. (backtrace)

Returns a stack backtrace, if available, of where this error occurred. Read more

fn description(&self) -> &str1.0.0[src]

👎 Deprecated since 1.42.0:

use the Display impl or to_string()

fn cause(&self) -> Option<&dyn Error>1.0.0[src]

👎 Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

impl<A: Actor<S> + 'static, S: Sig + 'static, V: Debug + Error + 'static> From<ValidationError<A, S, V>> for Error<A, S, V>[src]

fn from(source: ValidationError<A, S, V>) -> Self[src]

Performs the conversion.

Auto Trait Implementations

impl<A, S, V> RefUnwindSafe for ValidationError<A, S, V> where
    A: RefUnwindSafe,
    S: RefUnwindSafe,
    V: RefUnwindSafe

impl<A, S, V> Send for ValidationError<A, S, V> where
    A: Send,
    S: Send,
    V: Send

impl<A, S, V> Sync for ValidationError<A, S, V> where
    A: Sync,
    S: Sync,
    V: Sync

impl<A, S, V> Unpin for ValidationError<A, S, V> where
    A: Unpin,
    S: Unpin,
    V: Unpin

impl<A, S, V> UnwindSafe for ValidationError<A, S, V> where
    A: RefUnwindSafe + UnwindSafe,
    S: UnwindSafe,
    V: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<T> From<T> for T[src]

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

pub fn into(self) -> U[src]

Performs the conversion.

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToString for T where
    T: Display + ?Sized
[src]

pub default fn to_string(&self) -> String[src]

Converts the given value to a String. Read more

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

pub fn vzip(self) -> V