pub enum WalError {
CapacityExhausted(String),
PositionUnavailable {
source_id: String,
requested: u64,
oldest_available: Option<u64>,
},
SourceNotRegistered(String),
SourceAlreadyRegistered(String),
InvalidSourceId(String, String),
InvalidEvent(String),
InvalidConfig(String),
StorageError(String),
SerializationError(String),
}Expand description
Errors that can occur during WAL operations.
All variants include source_id context where relevant, since a single
WalProvider instance typically serves multiple sources.
Variants§
CapacityExhausted(String)
The WAL for the given source has reached its configured maximum event capacity
and the policy is CapacityPolicy::RejectIncoming.
The requested replay position has been pruned and is older than the
oldest retained sequence. Reading from a sequence greater than head
is not an error — it returns an empty result (the caller is caught up).
SourceNotRegistered(String)
Called a WAL operation for a source that was never registered.
SourceAlreadyRegistered(String)
Attempted to register a source that is already registered with a different config.
InvalidSourceId(String, String)
The supplied source_id is not acceptable to this provider (e.g., contains
path separators, .., or other characters a file-backed provider cannot
safely map to disk).
InvalidEvent(String)
The event is not valid for WAL storage (e.g., SourceChange::Future).
InvalidConfig(String)
Configuration validation failed (e.g., max_events below MIN_MAX_EVENTS).
StorageError(String)
An error in the underlying storage backend.
SerializationError(String)
An error during event serialization or deserialization.
Trait Implementations§
Source§impl Error for WalError
impl Error for WalError
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()