pub enum SchemaMaxSerializedSizeError {
Overflow,
Recursive,
MissingDefinition(Declaration),
}
Expand description
Possible error when calculating theoretical maximum size of encoded type T
.
Variants§
Overflow
The theoretical maximum size of the encoded value overflows usize
.
This may happen for nested dynamically-sized types such as
Vec<Vec<u8>>
whose maximum size is 4 + u32::MAX * (4 + u32::MAX)
.
Recursive
The type is recursive and thus theoretical maximum size is infinite.
Simple type in which this triggers is struct Rec(Option<Box<Rec>>)
.
MissingDefinition(Declaration)
Some of the declared types were lacking definition making it impossible to calculate the size.
Trait Implementations§
impl Eq for Error
impl StructuralPartialEq for Error
Auto Trait Implementations§
impl Freeze for Error
impl RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnwindSafe for Error
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)