pub enum GenerateError {
Entropy(String),
PayloadTooLarge {
payload: usize,
available: usize,
deficit: usize,
recommended_side: Option<u32>,
},
DimensionsOutOfRange {
width: u32,
height: u32,
min_side: u32,
max_pixels: u64,
},
NoUsableTexture {
candidates: u32,
},
Sampling(RejectionExhausted),
Kdf(KdfError),
Expand(ExpandError),
Crypto(CryptoError),
Output(OutputError),
}Expand description
Everything that can go wrong between a plaintext and a generated container.
Variants§
Entropy(String)
The system random number generator could not be read.
Fatal rather than papered over: every alternative source of a seed is one an adversary can reproduce, and a container generated from a guessable seed is one they can regenerate and compare against.
PayloadTooLarge
The compressed payload is larger than the requested container can hold.
Fields
DimensionsOutOfRange
The requested container size is outside the permitted range.
Fields
NoUsableTexture
No candidate texture passed the container gates.
Sampling(RejectionExhausted)
Conditioned sampling could not reach a parity.
Kdf(KdfError)
Argon2id password stretching failed.
Expand(ExpandError)
HKDF-SHA3-512 expansion of the master key failed.
Crypto(CryptoError)
Compression or encryption failed.
Output(OutputError)
The container could not be written to disk.
Trait Implementations§
Source§impl Debug for GenerateError
impl Debug for GenerateError
Source§impl Display for GenerateError
impl Display for GenerateError
Source§impl Error for GenerateError
impl Error for GenerateError
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<AEADError> for GenerateError
impl From<AEADError> for GenerateError
Source§impl From<CryptoError> for GenerateError
impl From<CryptoError> for GenerateError
Source§fn from(err: CryptoError) -> Self
fn from(err: CryptoError) -> Self
Converts to this type from the input type.
Source§impl From<ExpandError> for GenerateError
impl From<ExpandError> for GenerateError
Source§fn from(err: ExpandError) -> Self
fn from(err: ExpandError) -> Self
Converts to this type from the input type.
Source§impl From<KdfError> for GenerateError
impl From<KdfError> for GenerateError
Source§impl From<OutputError> for GenerateError
impl From<OutputError> for GenerateError
Source§fn from(err: OutputError) -> Self
fn from(err: OutputError) -> Self
Converts to this type from the input type.
Source§impl From<RejectionExhausted> for GenerateError
impl From<RejectionExhausted> for GenerateError
Source§fn from(err: RejectionExhausted) -> Self
fn from(err: RejectionExhausted) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for GenerateError
impl RefUnwindSafe for GenerateError
impl Send for GenerateError
impl Sync for GenerateError
impl Unpin for GenerateError
impl UnsafeUnpin for GenerateError
impl UnwindSafe for GenerateError
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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