SignalProtocolError

Enum SignalProtocolError 

Source
pub enum SignalProtocolError {
Show 35 variants InvalidArgument(String), InvalidState(&'static str, String), InvalidProtobufEncoding, CiphertextMessageTooShort(usize), LegacyCiphertextVersion(u8), UnrecognizedCiphertextVersion(u8), UnrecognizedMessageVersion(u32), NoKeyTypeIdentifier, BadKeyType(u8), BadKeyLength(KeyType, usize), InvalidKeyAgreement, SignatureValidationFailed, UntrustedIdentity(ProtocolAddress), InvalidPreKeyId, InvalidSignedPreKeyId, InvalidKyberPreKeyId, InvalidMacKeyLength(usize), NoSenderKeyState { distribution_id: Uuid, }, InvalidProtocolAddress { name: String, device_id: u32, }, SessionNotFound(ProtocolAddress), InvalidSessionStructure(&'static str), InvalidSenderKeySession { distribution_id: Uuid, }, InvalidRegistrationId(ProtocolAddress, u32), DuplicatedMessage(u32, u32), InvalidMessage(CiphertextMessageType, &'static str), FfiBindingError(String), ApplicationCallbackError(&'static str, Box<dyn Error + UnwindSafe + Send + Sync>), InvalidSealedSenderMessage(String), UnknownSealedSenderVersion(u8), SealedSenderSelfSend, UnknownSealedSenderServerCertificateId(u32), BadKEMKeyType(u8), WrongKEMKeyType(u8, u8), BadKEMKeyLength(KeyType, usize), BadKEMCiphertextLength(KeyType, usize),
}

Variants§

§

InvalidArgument(String)

invalid argument: {0}

§

InvalidState(&'static str, String)

invalid state for call to {0} to succeed: {1}

§

InvalidProtobufEncoding

protobuf encoding was invalid

§

CiphertextMessageTooShort(usize)

ciphertext serialized bytes were too short <{0}>

§

LegacyCiphertextVersion(u8)

ciphertext version was too old <{0}>

§

UnrecognizedCiphertextVersion(u8)

ciphertext version was unrecognized <{0}>

§

UnrecognizedMessageVersion(u32)

unrecognized message version <{0}>

§

NoKeyTypeIdentifier

no key type identifier

§

BadKeyType(u8)

bad key type <{0:#04x}>

§

BadKeyLength(KeyType, usize)

bad key length <{1}> for key with type <{0}>

§

InvalidKeyAgreement

invalid key agreement

§

SignatureValidationFailed

invalid signature detected

§

UntrustedIdentity(ProtocolAddress)

untrusted identity for address {0}

§

InvalidPreKeyId

invalid prekey identifier

§

InvalidSignedPreKeyId

invalid signed prekey identifier

§

InvalidKyberPreKeyId

invalid Kyber prekey identifier

§

InvalidMacKeyLength(usize)

invalid MAC key length <{0}>

§

NoSenderKeyState

missing sender key state for distribution ID {distribution_id}

Fields

§distribution_id: Uuid
§

InvalidProtocolAddress

protocol address is invalid: {name}.{device_id}

Fields

§name: String
§device_id: u32
§

SessionNotFound(ProtocolAddress)

session with {0} not found

§

InvalidSessionStructure(&'static str)

invalid session: {0}

§

InvalidSenderKeySession

invalid sender key session with distribution ID {distribution_id}

Fields

§distribution_id: Uuid
§

InvalidRegistrationId(ProtocolAddress, u32)

session for {0} has invalid registration ID {1:X}

§

DuplicatedMessage(u32, u32)

message with old counter {0} / {1}

§

InvalidMessage(CiphertextMessageType, &'static str)

invalid {0:?} message: {1}

§

FfiBindingError(String)

error while invoking an ffi callback: {0}

§

ApplicationCallbackError(&'static str, Box<dyn Error + UnwindSafe + Send + Sync>)

error in method call ‘{0}’: {1}

§

InvalidSealedSenderMessage(String)

invalid sealed sender message: {0}

§

UnknownSealedSenderVersion(u8)

unknown sealed sender message version {0}

§

SealedSenderSelfSend

self send of a sealed sender message

§

UnknownSealedSenderServerCertificateId(u32)

unknown server certificate ID: {0}

§

BadKEMKeyType(u8)

bad KEM key type <{0:#04x}>

§

WrongKEMKeyType(u8, u8)

unexpected KEM key type <{0:#04x}> (expected <{1:#04x}>)

§

BadKEMKeyLength(KeyType, usize)

bad KEM key length <{1}> for key with type <{0}>

§

BadKEMCiphertextLength(KeyType, usize)

bad KEM ciphertext length <{1}> for key with type <{0}>

Implementations§

Source§

impl SignalProtocolError

Source

pub fn for_application_callback<E>( method: &'static str, ) -> impl FnOnce(E) -> SignalProtocolError
where E: Error + Send + Sync + UnwindSafe + 'static,

Trait Implementations§

Source§

impl Debug for SignalProtocolError

Source§

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

Formats the value using the given formatter. Read more
Source§

impl Display for SignalProtocolError

Source§

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

Formats the value using the given formatter. Read more
Source§

impl Error for SignalProtocolError

Source§

fn source(&self) -> Option<&(dyn Error + 'static)>

Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
Source§

impl From<CurveError> for SignalProtocolError

Source§

fn from(e: CurveError) -> SignalProtocolError

Converts to this type from the input type.
Source§

impl From<InvalidSessionError> for SignalProtocolError

Source§

fn from(e: InvalidSessionError) -> SignalProtocolError

Converts to this type from the input type.
Source§

impl From<SignalProtocolError> for InvalidKeyError

Source§

fn from(source: SignalProtocolError) -> Self

Converts to this type from the input type.
Source§

impl From<SignalProtocolError> for MessageSenderError

Source§

fn from(source: SignalProtocolError) -> Self

Converts to this type from the input type.
Source§

impl From<SignalProtocolError> for ProvisioningError

Source§

fn from(source: SignalProtocolError) -> Self

Converts to this type from the input type.
Source§

impl From<SignalProtocolError> for ServiceError

Source§

fn from(source: SignalProtocolError) -> Self

Converts to this type from the input type.

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
§

impl<T> Classify for T

§

type Classified = T

§

fn classify(self) -> T

§

impl<T> Declassify for T

§

type Declassified = T

§

fn declassify(self) -> T

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
§

impl<T> IntoRequest<T> for T

§

fn into_request(self) -> Request<T>

Wrap the input message T in a tonic::Request
§

impl<L> LayerExt<L> for L

§

fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>
where L: Layer<S>,

Applies the layer to a service and wraps it in [Layered].
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
§

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

§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] only if self and other return Action::Follow. Read more
§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
§

impl<T> ToStringFallible for T
where T: Display,

§

fn try_to_string(&self) -> Result<String, TryReserveError>

ToString::to_string, but without panic on OOM.

Source§

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

Source§

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>,

Source§

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.
§

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

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more