Enum otrr::OTRError

source ·
pub enum OTRError {
Show 15 variants ProtocolViolation(&'static str), IncompleteMessage, UnreadableMessage(InstanceTag), MessageForOtherInstance, UnknownInstance(InstanceTag), UnsupportedVersion(u16), IncorrectState(&'static str), CryptographicViolation(CryptoError), PolicyRestriction(&'static str), AuthenticationError(AKEError), SMPInProgress, SMPSuccess(Option<TLV>), SMPFailed(Option<TLV>), SMPAborted(bool), UserError(&'static str),
}
Expand description

OTRError is the enum containing the various errors that can occur.

Variants§

§

ProtocolViolation(&'static str)

Message contained invalid data according to the OTR protocol.

§

IncompleteMessage

Message payload is incomplete. The message cannot be reconstructed from the received bytes.

§

UnreadableMessage(InstanceTag)

Encrypted message is unreadable due to loss of keys and/or wrong protocol state.

§

MessageForOtherInstance

An OTR message was received that is intended for a different instance (client).

§

UnknownInstance(InstanceTag)

Message to be sent to an unknown instance.

§

UnsupportedVersion(u16)

Unsupported version encountered.

§

IncorrectState(&'static str)

Messaging is blocked in OTR protocol “Finished” state to ensure no accidental disclosure occurs.

§

CryptographicViolation(CryptoError)

Violation of cryptographic or mathematical requirement for correct/secure operation.

§

PolicyRestriction(&'static str)

PolicyRestriction indicates an error caused by the active policy.

§

AuthenticationError(AKEError)

(AKE) AuthenticationError indicates that there was an error during AKE.

§

SMPInProgress

SMPInProgress indicates that an SMP exchange is in progress, so to initiate a new SMP, the previous one needs to be aborted first.

§

SMPSuccess(Option<TLV>)

SMPSuccess indicates successful finishing SMP without a follow-up TLV needing to be sent.

§

SMPFailed(Option<TLV>)

SMPFailed indicates a unsuccessfully completed SMP.

§

SMPAborted(bool)

SMPAborted indicates SMP process was aborted, most likely by user request. Provided TLV can be sent to other party to signal SMP abort. The boolean value indicates whether the abort-action needs to be communicated, that is: true to require sending abort-TLV, false if no further action needed.

§

UserError(&'static str)

UserError indicates a user error, with a description provided in the tuple.

Trait Implementations§

source§

impl Debug for OTRError

source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

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

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
source§

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

Performs the conversion.
source§

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

source§

fn vzip(self) -> V