Rust referencezer0-secret-stream
zer0-secret-stream · errors
Source declarations, signatures and documentation for errors.
Source: sigil/weave/network/zer0-secret-stream/src/errors.rs. SHA-256: 50c6f1235d89111ac7bbe9389cdb9de1c447e6b614735baefcc823366849321e.
This reference follows declared source modules, retains conditional attributes, and includes public declarations and implementation methods. Private-module re-exports and trait resolution require the compiler; this is a source reference, not a claim that every listed item is a root import. Function bodies and constant values are omitted.
errors::Result
Result type alias for SecretStream operations
pub type Result<T> = std::result::Result<T, SecretStreamError>;Source line: 7.
errors::SecretStreamError
Errors that can occur during SecretStream operations
#[derive(Error, Debug)]
pub enum SecretStreamError {
/// IO error from underlying stream
#[error("IO error: {0}")]
Io(#[from] io::Error),
/// Handshake failed
#[error("Handshake failed: {0}")]
HandshakeFailed(String),
/// Invalid message format
#[error("Invalid message format: {0}")]
InvalidMessage(String),
/// Message too large
#[error("Message too large: size {size} exceeds maximum {max}")]
MessageTooLarge { size: usize, max: usize },
/// Stream not connected
#[error("Stream not connected")]
NotConnected,
/// Stream already connected
#[error("Stream already connected")]
AlreadyConnected,
/// Encryption error
#[error("Encryption error: {0}")]
Encryption(String),
/// Decryption error
#[error("Decryption error: {0}")]
Decryption(String),
/// Invalid stream ID
#[error("Invalid stream ID")]
InvalidStreamId,
/// Send disabled
#[error("Send functionality is disabled")]
SendDisabled,
/// Channel closed
#[error("Message channel closed")]
ChannelClosed,
/// Timeout
#[error("Operation timed out")]
Timeout,
/// Invalid key
#[error("Invalid key: {0}")]
InvalidKey(String),
/// Protocol error
#[error("Protocol error: {0}")]
Protocol(String),
#[error("Handshake error: {0}")]
Handshake(#[from] crate::handshake::HandshakeError),
#[error("Invalid message header")]
InvalidMessageHeader,
#[error("Encryption error")]
EncryptionError,
/// Feature not implemented yet (used for cross-crate sequencing gates)
#[error("Not implemented: {0}")]
NotImplemented(&'static str),
}Source line: 11.