#[non_exhaustive]pub enum InvalidEncodingReason {
TooLong {
max_bytes: usize,
},
ValueOutOfRange {
terminal_byte: u8,
allowed_mask: u8,
},
InvalidBooleanValue {
value: u8,
},
StringTooLong {
max_bytes: usize,
},
TooManyUtf16CodeUnits {
max_code_units: usize,
},
NegativeLength {
value: i32,
},
InvalidUtf8 {
valid_up_to: usize,
error_len: Option<usize>,
},
InvalidNbt,
InvalidJson,
InvalidTextComponentRootTag {
tag: u8,
},
}Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
TooLong
ValueOutOfRange
InvalidBooleanValue
StringTooLong
TooManyUtf16CodeUnits
NegativeLength
InvalidUtf8
InvalidNbt
InvalidJson
InvalidTextComponentRootTag
Trait Implementations§
Source§impl Clone for InvalidEncodingReason
impl Clone for InvalidEncodingReason
Source§fn clone(&self) -> InvalidEncodingReason
fn clone(&self) -> InvalidEncodingReason
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for InvalidEncodingReason
Source§impl Debug for InvalidEncodingReason
impl Debug for InvalidEncodingReason
Source§impl Display for InvalidEncodingReason
impl Display for InvalidEncodingReason
impl Eq for InvalidEncodingReason
Source§impl Hash for InvalidEncodingReason
impl Hash for InvalidEncodingReason
Source§impl PartialEq for InvalidEncodingReason
impl PartialEq for InvalidEncodingReason
impl StructuralPartialEq for InvalidEncodingReason
Auto Trait Implementations§
impl Freeze for InvalidEncodingReason
impl RefUnwindSafe for InvalidEncodingReason
impl Send for InvalidEncodingReason
impl Sync for InvalidEncodingReason
impl Unpin for InvalidEncodingReason
impl UnsafeUnpin for InvalidEncodingReason
impl UnwindSafe for InvalidEncodingReason
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