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.
CryptoError
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§
Source§impl Clone for LibraryError
impl Clone for LibraryError
Source§fn clone(&self) -> LibraryError
fn clone(&self) -> LibraryError
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for LibraryError
impl Debug for LibraryError
Source§impl Display for LibraryError
impl Display for LibraryError
Source§impl Error for LibraryError
impl Error for LibraryError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
Source§impl<StorageError> From<LibraryError> for AddMembersError<StorageError>
impl<StorageError> From<LibraryError> for AddMembersError<StorageError>
Source§fn from(source: LibraryError) -> Self
fn from(source: LibraryError) -> Self
Source§impl From<LibraryError> for ApplyUpdatePathError
impl From<LibraryError> for ApplyUpdatePathError
Source§fn from(source: LibraryError) -> Self
fn from(source: LibraryError) -> Self
Source§impl<StorageError> From<LibraryError> for CommitBuilderStageError<StorageError>
impl<StorageError> From<LibraryError> for CommitBuilderStageError<StorageError>
Source§fn from(source: LibraryError) -> Self
fn from(source: LibraryError) -> Self
Source§impl<StorageError> From<LibraryError> for CommitToPendingProposalsError<StorageError>
impl<StorageError> From<LibraryError> for CommitToPendingProposalsError<StorageError>
Source§fn from(source: LibraryError) -> Self
fn from(source: LibraryError) -> Self
Source§impl From<LibraryError> for CreateAddProposalError
impl From<LibraryError> for CreateAddProposalError
Source§fn from(source: LibraryError) -> Self
fn from(source: LibraryError) -> Self
Source§impl From<LibraryError> for CreateCommitError
impl From<LibraryError> for CreateCommitError
Source§fn from(source: LibraryError) -> Self
fn from(source: LibraryError) -> Self
Source§impl<StorageError> From<LibraryError> for CreateGroupContextExtProposalError<StorageError>
impl<StorageError> From<LibraryError> for CreateGroupContextExtProposalError<StorageError>
Source§fn from(source: LibraryError) -> Self
fn from(source: LibraryError) -> Self
Source§impl From<LibraryError> for CreateMessageError
impl From<LibraryError> for CreateMessageError
Source§fn from(source: LibraryError) -> Self
fn from(source: LibraryError) -> Self
Source§impl<StorageError> From<LibraryError> for CreationFromExternalError<StorageError>
impl<StorageError> From<LibraryError> for CreationFromExternalError<StorageError>
Source§fn from(source: LibraryError) -> Self
fn from(source: LibraryError) -> Self
Source§impl From<LibraryError> for CredentialError
impl From<LibraryError> for CredentialError
Source§fn from(source: LibraryError) -> Self
fn from(source: LibraryError) -> Self
Source§impl From<LibraryError> for ExportGroupInfoError
impl From<LibraryError> for ExportGroupInfoError
Source§fn from(source: LibraryError) -> Self
fn from(source: LibraryError) -> Self
Source§impl From<LibraryError> for ExportSecretError
impl From<LibraryError> for ExportSecretError
Source§fn from(source: LibraryError) -> Self
fn from(source: LibraryError) -> Self
Source§impl From<LibraryError> for ExtensionError
impl From<LibraryError> for ExtensionError
Source§fn from(source: LibraryError) -> Self
fn from(source: LibraryError) -> Self
Source§impl<StorageError> From<LibraryError> for ExternalCommitError<StorageError>
impl<StorageError> From<LibraryError> for ExternalCommitError<StorageError>
Source§fn from(source: LibraryError) -> Self
fn from(source: LibraryError) -> Self
Source§impl From<LibraryError> for ExternalCommitValidationError
impl From<LibraryError> for ExternalCommitValidationError
Source§fn from(source: LibraryError) -> Self
fn from(source: LibraryError) -> Self
Source§impl From<LibraryError> for GroupContextExtensionsProposalValidationError
impl From<LibraryError> for GroupContextExtensionsProposalValidationError
Source§fn from(source: LibraryError) -> Self
fn from(source: LibraryError) -> Self
Source§impl From<LibraryError> for KeyPackageNewError
impl From<LibraryError> for KeyPackageNewError
Source§fn from(source: LibraryError) -> Self
fn from(source: LibraryError) -> Self
Source§impl From<LibraryError> for KeyPackageVerifyError
impl From<LibraryError> for KeyPackageVerifyError
Source§fn from(source: LibraryError) -> Self
fn from(source: LibraryError) -> Self
Source§impl<StorageError> From<LibraryError> for LeafNodeUpdateError<StorageError>
impl<StorageError> From<LibraryError> for LeafNodeUpdateError<StorageError>
Source§fn from(source: LibraryError) -> Self
fn from(source: LibraryError) -> Self
Source§impl<StorageError> From<LibraryError> for LeaveGroupError<StorageError>
impl<StorageError> From<LibraryError> for LeaveGroupError<StorageError>
Source§fn from(source: LibraryError) -> Self
fn from(source: LibraryError) -> Self
Source§impl<StorageError> From<LibraryError> for MergeCommitError<StorageError>
impl<StorageError> From<LibraryError> for MergeCommitError<StorageError>
Source§fn from(source: LibraryError) -> Self
fn from(source: LibraryError) -> Self
Source§impl From<LibraryError> for MessageDecryptionError
impl From<LibraryError> for MessageDecryptionError
Source§fn from(source: LibraryError) -> Self
fn from(source: LibraryError) -> Self
Source§impl From<LibraryError> for MlsGroupStateError
impl From<LibraryError> for MlsGroupStateError
Source§fn from(source: LibraryError) -> Self
fn from(source: LibraryError) -> Self
Source§impl<StorageError> From<LibraryError> for NewGroupError<StorageError>
impl<StorageError> From<LibraryError> for NewGroupError<StorageError>
Source§fn from(source: LibraryError) -> Self
fn from(source: LibraryError) -> Self
Source§impl From<LibraryError> for ProcessMessageError
impl From<LibraryError> for ProcessMessageError
Source§fn from(source: LibraryError) -> Self
fn from(source: LibraryError) -> Self
Source§impl<StorageError> From<LibraryError> for ProposalError<StorageError>
impl<StorageError> From<LibraryError> for ProposalError<StorageError>
Source§fn from(source: LibraryError) -> Self
fn from(source: LibraryError) -> Self
Source§impl From<LibraryError> for ProposalValidationError
impl From<LibraryError> for ProposalValidationError
Source§fn from(source: LibraryError) -> Self
fn from(source: LibraryError) -> Self
Source§impl<StorageError> From<LibraryError> for ProposeAddMemberError<StorageError>
impl<StorageError> From<LibraryError> for ProposeAddMemberError<StorageError>
Source§fn from(source: LibraryError) -> Self
fn from(source: LibraryError) -> Self
Source§impl From<LibraryError> for ProposePskError
impl From<LibraryError> for ProposePskError
Source§fn from(source: LibraryError) -> Self
fn from(source: LibraryError) -> Self
Source§impl<StorageError> From<LibraryError> for ProposeRemoveMemberError<StorageError>
impl<StorageError> From<LibraryError> for ProposeRemoveMemberError<StorageError>
Source§fn from(source: LibraryError) -> Self
fn from(source: LibraryError) -> Self
Source§impl<StorageError> From<LibraryError> for ProposeSelfUpdateError<StorageError>
impl<StorageError> From<LibraryError> for ProposeSelfUpdateError<StorageError>
Source§fn from(source: LibraryError) -> Self
fn from(source: LibraryError) -> Self
Source§impl From<LibraryError> for PskError
impl From<LibraryError> for PskError
Source§fn from(source: LibraryError) -> Self
fn from(source: LibraryError) -> Self
Source§impl From<LibraryError> for PublicGroupBuildError
impl From<LibraryError> for PublicGroupBuildError
Source§fn from(source: LibraryError) -> Self
fn from(source: LibraryError) -> Self
Source§impl From<LibraryError> for PublicTreeError
impl From<LibraryError> for PublicTreeError
Source§fn from(source: LibraryError) -> Self
fn from(source: LibraryError) -> Self
Source§impl<StorageError> From<LibraryError> for RemoveMembersError<StorageError>
impl<StorageError> From<LibraryError> for RemoveMembersError<StorageError>
Source§fn from(source: LibraryError) -> Self
fn from(source: LibraryError) -> Self
Source§impl<StorageError> From<LibraryError> for SelfUpdateError<StorageError>
impl<StorageError> From<LibraryError> for SelfUpdateError<StorageError>
Source§fn from(source: LibraryError) -> Self
fn from(source: LibraryError) -> Self
Source§impl From<LibraryError> for StageCommitError
impl From<LibraryError> for StageCommitError
Source§fn from(source: LibraryError) -> Self
fn from(source: LibraryError) -> Self
Source§impl From<LibraryError> for TreeSyncAddLeaf
impl From<LibraryError> for TreeSyncAddLeaf
Source§fn from(source: LibraryError) -> Self
fn from(source: LibraryError) -> Self
Source§impl From<LibraryError> for TreeSyncFromNodesError
impl From<LibraryError> for TreeSyncFromNodesError
Source§fn from(source: LibraryError) -> Self
fn from(source: LibraryError) -> Self
Source§impl From<LibraryError> for ValidationError
impl From<LibraryError> for ValidationError
Source§fn from(source: LibraryError) -> Self
fn from(source: LibraryError) -> Self
Source§impl<StorageError> From<LibraryError> for WelcomeError<StorageError>
impl<StorageError> From<LibraryError> for WelcomeError<StorageError>
Source§fn from(source: LibraryError) -> Self
fn from(source: LibraryError) -> Self
Source§impl PartialEq for LibraryError
impl PartialEq for LibraryError
impl Eq for LibraryError
impl StructuralPartialEq for LibraryError
Auto Trait Implementations§
impl Freeze for LibraryError
impl RefUnwindSafe for LibraryError
impl Send for LibraryError
impl Sync for LibraryError
impl Unpin for LibraryError
impl UnwindSafe for LibraryError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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