pub enum PlanError {
BufferTooSmall {
needed: usize,
actual: usize,
},
AlignmentTooLarge {
alignment_log2: u8,
},
PayloadOverflow,
TooManySections {
count: usize,
},
DuplicateKind {
kind: u32,
},
}Expand description
Error returned by snapshot writers.
Returned by SnapshotPlan::new,
SnapshotPlan::write_into, and the
alloc-gated SnapshotBuilder methods.
§Performance
perf: unspecified; errors are returned only from writer paths.
Variants§
BufferTooSmall
The output buffer is smaller than the snapshot’s encoded length.
Fields
AlignmentTooLarge
A section’s alignment_log2 exceeds MAX_ALIGNMENT_LOG2.
PayloadOverflow
Computed offsets or lengths overflowed u64 or usize.
TooManySections
More sections were supplied than the v1 cap permits.
DuplicateKind
Two pending sections shared the same kind.
Trait Implementations§
impl Copy for PlanError
impl Eq for PlanError
Source§impl Error for PlanError
impl Error for PlanError
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()
impl StructuralPartialEq for PlanError
Auto Trait Implementations§
impl Freeze for PlanError
impl RefUnwindSafe for PlanError
impl Send for PlanError
impl Sync for PlanError
impl Unpin for PlanError
impl UnsafeUnpin for PlanError
impl UnwindSafe for PlanError
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