pub enum Error {
Show 13 variants
ZeroScalar,
NotOnCurve,
BadLength,
BadPqKey,
KeyNeedsMoreBlocks,
NoiseOutOfRange,
CiphertextMismatch,
NotForUs,
HandshakeMismatch,
UnknownCommitment,
ReusedIndex,
ChannelNotOpen,
ChannelAlreadyOpen,
}Variants§
ZeroScalar
A scalar was zero where a key or ephemeral is needed.
NotOnCurve
A point isn’t on Grumpkin (or is the identity).
BadLength
A payload isn’t whole blocks of 3 fields, or bytes have the wrong length.
BadPqKey
The ML-KEM encapsulation key fails the FIPS 203 modulus check.
KeyNeedsMoreBlocks
SampleNTT needs more than the circuit’s bound of SHAKE128 blocks (2^-102 per key).
NoiseOutOfRange
A noise coefficient is outside [-2, 2].
CiphertextMismatch
The carried lattice ciphertext doesn’t open its commitment.
NotForUs
A handshake’s tag doesn’t match this receiver’s keys.
HandshakeMismatch
The handshake’s root doesn’t match its commitment, or a note opening doesn’t match the transfer’s C0.
UnknownCommitment
No held chain key matches the transfer’s commitment.
ReusedIndex
C_t was already consumed (a reused chain index) or the handshake was already opened (a replay).
ChannelNotOpen
The sender’s channel has no handshake yet, or already has one.
ChannelAlreadyOpen
Trait Implementations§
impl Eq for Error
Source§impl Error for Error
impl Error for Error
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
use the Display impl or to_string()
impl StructuralPartialEq for Error
Auto Trait Implementations§
impl Freeze for Error
impl RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnsafeUnpin for Error
impl UnwindSafe for Error
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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