pub enum PskError {
LibraryError(LibraryError),
TooManyKeys,
KeyNotFound,
Storage,
TypeMismatch {
allowed: Vec<PskType>,
got: PskType,
},
UsageMismatch {
allowed: Vec<ResumptionPskUsage>,
got: ResumptionPskUsage,
},
UsageConflict {
first: ResumptionPskUsage,
second: ResumptionPskUsage,
},
UsageDuplicate {
usage: ResumptionPskUsage,
},
NonceLengthMismatch {
expected: usize,
got: usize,
},
Duplicate {
first: PreSharedKeyId,
},
}Expand description
PSK secret error
Variants§
LibraryError(LibraryError)
See LibraryError for more details.
TooManyKeys
More than 2^16 PSKs were provided.
KeyNotFound
The PSK could not be found in the store.
Storage
Failed to write PSK into storage.
TypeMismatch
Type mismatch.
UsageMismatch
Usage mismatch.
UsageConflict
Usage conflict.
Fields
§
first: ResumptionPskUsageFirst found PSK type.
§
second: ResumptionPskUsageSecond found PSK type.
UsageDuplicate
Usage duplicate.
Fields
§
usage: ResumptionPskUsageResumption usage found in duplicate.
NonceLengthMismatch
Nonce length mismatch.
Duplicate
Duplicate PSK ID.
Fields
§
first: PreSharedKeyIdFirst detected duplicate.
Trait Implementations§
Source§impl Error for PskError
impl Error for PskError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
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
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§impl From<LibraryError> for PskError
impl From<LibraryError> for PskError
Source§fn from(source: LibraryError) -> Self
fn from(source: LibraryError) -> Self
Converts to this type from the input type.
Source§impl From<PskError> for CreateCommitError
impl From<PskError> for CreateCommitError
Source§impl From<PskError> for ProposalValidationError
impl From<PskError> for ProposalValidationError
Source§impl From<PskError> for ProposePskError
impl From<PskError> for ProposePskError
Source§impl From<PskError> for StageCommitError
impl From<PskError> for StageCommitError
Source§impl<StorageError> From<PskError> for WelcomeError<StorageError>
impl<StorageError> From<PskError> for WelcomeError<StorageError>
impl StructuralPartialEq for PskError
Auto Trait Implementations§
impl Freeze for PskError
impl RefUnwindSafe for PskError
impl Send for PskError
impl Sync for PskError
impl Unpin for PskError
impl UnwindSafe for PskError
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
Mutably borrows from an owned value. Read more
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>
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 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>
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