#[non_exhaustive]pub enum SnbtErrorKind {
Show 33 variants
TrailingData,
ExpectedSymbol(char),
ExpectedValue,
ExpectedKey,
EmptyKey,
ExpectedArrayElement,
InvalidArrayElementType,
ExpectedNumberOrBoolean,
ExpectedStringUuid,
UnknownOperation {
name: String,
argument_count: usize,
},
ExpectedNumber,
ExpectedBinaryNumeral,
ExpectedDecimalNumeral,
ExpectedHexNumeral,
ExpectedQuotedString,
UnclosedQuotedString,
UnclosedEscapeSequence,
InvalidEscape(char),
ExpectedHexEscape {
digits: usize,
},
InvalidCodepoint(u32),
ExpectedCharacterName,
UnclosedCharacterName,
InvalidCharacterName(String),
ExpectedUnquotedString,
InvalidFloatingPoint,
NonFiniteNumber,
InvalidUnderscore,
InvalidInteger,
LeadingZero,
ExpectedNonNegativeNumber,
IntegerTooLarge,
NumberOutOfRange {
number_type: SnbtNumberType,
unsigned: bool,
},
InvalidNumber,
}Expand description
Specific reason why SNBT parsing failed.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
TrailingData
Non-whitespace input remained after a complete tag.
ExpectedSymbol(char)
A grammar symbol was required at the cursor.
ExpectedValue
An SNBT value was required at the cursor.
ExpectedKey
A compound key was required at the cursor.
EmptyKey
A compound key was present but empty.
ExpectedArrayElement
A typed-array element was not an integer.
InvalidArrayElementType
A typed-array element used an unsupported integer width.
ExpectedNumberOrBoolean
The bool operation received neither a number nor a boolean.
ExpectedStringUuid
The uuid operation did not receive a valid UUID string.
UnknownOperation
No built-in operation matched the name and argument count.
Fields
ExpectedNumber
A number was required at the cursor.
ExpectedBinaryNumeral
A binary numeral was required at the cursor.
ExpectedDecimalNumeral
A decimal numeral was required at the cursor.
ExpectedHexNumeral
A hexadecimal numeral was required at the cursor.
ExpectedQuotedString
A quoted string was required at the cursor.
UnclosedQuotedString
A quoted string was not terminated.
UnclosedEscapeSequence
An escape introducer was not followed by an escape value.
InvalidEscape(char)
A quoted string contained an unsupported escape.
ExpectedHexEscape
A Unicode escape did not contain the required hexadecimal digits.
InvalidCodepoint(u32)
A Unicode escape resolved to an invalid code point.
ExpectedCharacterName
A named Unicode escape did not begin with a character name.
UnclosedCharacterName
A named Unicode escape was not terminated.
InvalidCharacterName(String)
A named Unicode escape did not identify a character.
ExpectedUnquotedString
An unquoted string was required at the cursor.
InvalidFloatingPoint
A floating-point token could not be parsed.
NonFiniteNumber
A non-finite floating-point value was supplied.
InvalidUnderscore
A number placed underscores outside its digits.
InvalidInteger
An integer token could not be parsed.
LeadingZero
A decimal integer contained a leading zero.
ExpectedNonNegativeNumber
An unsigned integer was negative.
IntegerTooLarge
An integer exceeded the parser’s intermediate representation.
NumberOutOfRange
A number did not fit its requested NBT integer type.
Fields
number_type: SnbtNumberTypeRequested NBT integer type.
InvalidNumber
A number token did not contain any digits.
Implementations§
Source§impl SnbtErrorKind
impl SnbtErrorKind
Trait Implementations§
Source§impl Clone for SnbtErrorKind
impl Clone for SnbtErrorKind
Source§fn clone(&self) -> SnbtErrorKind
fn clone(&self) -> SnbtErrorKind
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for SnbtErrorKind
impl Debug for SnbtErrorKind
Source§impl Display for SnbtErrorKind
impl Display for SnbtErrorKind
impl Eq for SnbtErrorKind
Source§impl PartialEq for SnbtErrorKind
impl PartialEq for SnbtErrorKind
impl StructuralPartialEq for SnbtErrorKind
Auto Trait Implementations§
impl Freeze for SnbtErrorKind
impl RefUnwindSafe for SnbtErrorKind
impl Send for SnbtErrorKind
impl Sync for SnbtErrorKind
impl Unpin for SnbtErrorKind
impl UnsafeUnpin for SnbtErrorKind
impl UnwindSafe for SnbtErrorKind
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreArc<SyncMutex<>>