#[non_exhaustive]pub enum StreamError {
}Expand description
Errors produced by the streaming encrypt/decrypt API.
All authentication failures collapse to StreamError::AuthFailed so the
caller learns nothing beyond “this stream did not verify”.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Io(Error)
Underlying reader or writer I/O failed.
BadMagic
The container magic bytes did not match.
UnsupportedVersion(u8)
The container declared an unsupported format version.
UnsupportedSuite(u8)
The container declared an unknown algorithm suite.
ReservedFlags
The reserved header flags byte was non-zero.
ShortHeader
The header was shorter than the format requires.
BadChunkSize(usize)
The requested or declared chunk size was zero or above MAX_CHUNK_SIZE.
ChunkTooLarge
A record’s length prefix implied a plaintext chunk above the limit.
SuiteMismatch
The decrypt entry point was called for a different suite family than the container actually uses (e.g. AEAD decrypt on an ML-KEM stream).
BadPublicKey
A supplied ML-KEM public encapsulation key was malformed.
BadCekLength
A supplied content-encryption key was not [CEK_LEN] bytes.
BadKemCiphertext
The ML-KEM ciphertext / encapsulated key was malformed.
Truncated
The stream ended before a final-marked chunk was authenticated.
AuthFailed
AEAD authentication failed: wrong key, tampered data/AAD, reordered or truncated chunk, or a downgraded header.
KdfFailed
HKDF key derivation failed.
SealFailed
AEAD sealing failed.
CekRecovery(Error)
Recovering the content-encryption key from the broker failed.
Trait Implementations§
Source§impl Debug for StreamError
impl Debug for StreamError
Source§impl Display for StreamError
impl Display for StreamError
Source§impl Error for StreamError
impl Error for StreamError
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()
Source§impl From<Error> for StreamError
impl From<Error> for StreamError
Auto Trait Implementations§
impl !RefUnwindSafe for StreamError
impl !UnwindSafe for StreamError
impl Freeze for StreamError
impl Send for StreamError
impl Sync for StreamError
impl Unpin for StreamError
impl UnsafeUnpin for StreamError
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request