pub enum SchemaContainerValidateError {
ZSTSequence(Declaration),
TagTooWide(Declaration),
TagTooNarrow(Declaration),
TagNotPowerOfTwo(Declaration),
MissingDefinition(Declaration),
EmptyLengthRange(Declaration),
}
Expand description
Possible error when validating a BorshSchemaContainer
, generated for some type T
,
for violation of any well-known rules with respect to borsh
serialization.
Variants§
ZSTSequence(Declaration)
sequences of zero-sized types of dynamic length are forbidden by definition see https://github.com/near/borsh-rs/pull/202 and related ones
TagTooWide(Declaration)
Declared tag width is too large. Tags may be at most eight bytes.
TagTooNarrow(Declaration)
Declared tag width is too small. Tags must be large enough to represent possible length of sequence.
TagNotPowerOfTwo(Declaration)
only 0, 1, 2, 4 and 8 bytes long sequences’ length_width
are allowed
MissingDefinition(Declaration)
Some of the declared types were lacking definition, which is considered a container’s validation error
EmptyLengthRange(Declaration)
A Sequence defined with an empty length range.
Trait Implementations§
source§impl PartialEq for Error
impl PartialEq for Error
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