pub enum StateLoadError {
Truncated {
expected: usize,
actual: usize,
},
BadMagic,
UnsupportedVersion {
found: u16,
supported: u16,
},
LengthMismatch {
declared: u32,
actual: usize,
},
FormatMismatch {
found: FormatId,
expected: FormatId,
},
}Expand description
Failure modes when unwrapping an envelope.
Variants§
Truncated
Buffer is shorter than the envelope header demands.
BadMagic
Magic prefix didn’t match — wrong file, raw plugin state, or corruption.
UnsupportedVersion
Envelope version is newer than this rack build knows.
Fields
LengthMismatch
Payload-length field disagrees with the buffer’s actual length.
Fields
FormatMismatch
Payload is from a different format than the host expected. The host can decide whether to surface this as an error or try to feed it anyway (some plugins span multiple formats).
Trait Implementations§
Source§impl Debug for StateLoadError
impl Debug for StateLoadError
Source§impl Display for StateLoadError
impl Display for StateLoadError
Source§impl Error for StateLoadError
impl Error for StateLoadError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl From<StateLoadError> for Error
impl From<StateLoadError> for Error
Source§fn from(source: StateLoadError) -> Self
fn from(source: StateLoadError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for StateLoadError
impl RefUnwindSafe for StateLoadError
impl Send for StateLoadError
impl Sync for StateLoadError
impl Unpin for StateLoadError
impl UnsafeUnpin for StateLoadError
impl UnwindSafe for StateLoadError
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
Mutably borrows from an owned value. Read more