pub struct LibraryError { /* private fields */ }
Expand description

Generic error type that indicates unrecoverable errors in the library.

This error has 3 subtypes:

MissingBoundsCheck

This error is returned when the library tries to serialize data that is too big for the MLS structs. In particular, when element lists contain more elements than the theoretical maximum defined in the spec, the serialization will fail. This should not happen when all input values are checked.

CryptoEror

This error is returned if the underlying crypto provider encountered an unexpected error. Possible reasons for this could be: the implementation of the crypto provider is not correct, the key material is not correct, the crypto provider does not support all functions required. Another reason could be that the OpenMLS library does not use the crypto provider API correctly.

Custom

This error is returned in situations where the implementation would otherwise use an unwrap(). If applications receive this error, it clearly indicates an implementation mistake in OpenMLS. The error includes a string that can give some more context about where the error originated and helps debugging.

In all cases, when a LibraryError is returned, applications should try to recover gracefully from it. It is recommended to log the error for potential debugging.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Formats the value using the given formatter. Read more

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

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

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

👎 Deprecated since 1.42.0:

use the Display impl or to_string()

👎 Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

The alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

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

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

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

Uses borrowed data to replace owned data, usually by cloning. Read more

Converts the given value to a String. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.