pub enum Error {
NotInitialized,
IncompatibleLayout,
Full,
Empty,
TooLarge {
max: usize,
len: usize,
},
BufferTooSmall {
required: usize,
provided: usize,
},
}Expand description
Core error type returned by the low-level region handles.
This error type is intentionally small and no_std-friendly.
§Recovery guidance
- Capacity errors (
Error::Full/Error::Empty) are typically recoverable by retrying after progress in another component (draining, routing, or polling). - Layout errors (
Error::NotInitialized/Error::IncompatibleLayout) are configuration or initialization problems and usually require re-initialization or a compatible mapping.
Variants§
NotInitialized
The mapped layout exists but has not completed initialization.
This commonly means the region creator has not called an init_* routine yet, or another
process is still in the middle of initializing.
IncompatibleLayout
The mapped layout is initialized but incompatible with this ABI version, capabilities, or structural expectations.
Typical causes:
- wrong region type at the address
- option mismatch (e.g., blocking wake section expected but not present)
- corrupted or partially initialized mapping
Full
The operation could not proceed because the region is full.
This is a backpressure signal. Callers may retry after consumers make progress.
Empty
The operation could not proceed because the region is empty.
This is not exceptional; polling receivers often treat this as Ok(None) at higher levels.
TooLarge
The payload length exceeds the maximum slot size.
The maximum is fixed by the ABI layout constant crate::INDEXBUS_SLOT_DATA_SIZE.
BufferTooSmall
The provided output buffer is too small to hold the message/state.
Callers should retry with a larger buffer of at least required bytes.