Enum scale_value::stringify::ParseErrorKind
source · pub enum ParseErrorKind {
ExpectedValue,
Complex(ParseComplexError),
Char(ParseCharError),
String(ParseStringError),
Number(ParseNumberError),
BitSequence(ParseBitSequenceError),
Custom(String),
}
Expand description
Details about the error that occurred.
Variants§
ExpectedValue
Complex(ParseComplexError)
Char(ParseCharError)
String(ParseStringError)
Number(ParseNumberError)
BitSequence(ParseBitSequenceError)
Custom(String)
Implementations§
source§impl ParseErrorKind
impl ParseErrorKind
sourcepub fn at(self, loc: usize) -> ParseError
pub fn at(self, loc: usize) -> ParseError
Error at a specific location with no specific end
sourcepub fn at_one(self, loc: usize) -> ParseError
pub fn at_one(self, loc: usize) -> ParseError
Error at a specific location for the next character
sourcepub fn between(self, start: usize, end: usize) -> ParseError
pub fn between(self, start: usize, end: usize) -> ParseError
Error between two locations.
source§impl ParseErrorKind
impl ParseErrorKind
sourcepub fn custom<T: Display>(value: T) -> Self
pub fn custom<T: Display>(value: T) -> Self
Construct a custom error from a type implementing core::fmt::Display
.
sourcepub fn custom_debug<T: Debug>(value: T) -> Self
pub fn custom_debug<T: Debug>(value: T) -> Self
Construct a custom error from a type implementing Debug
.
Prefer ParseErrorKind::custom
where possible.
Trait Implementations§
source§impl Debug for ParseErrorKind
impl Debug for ParseErrorKind
source§impl Display for ParseErrorKind
impl Display for ParseErrorKind
source§impl From<ParseBitSequenceError> for ParseErrorKind
impl From<ParseBitSequenceError> for ParseErrorKind
source§fn from(original: ParseBitSequenceError) -> ParseErrorKind
fn from(original: ParseBitSequenceError) -> ParseErrorKind
Converts to this type from the input type.
source§impl From<ParseCharError> for ParseErrorKind
impl From<ParseCharError> for ParseErrorKind
source§fn from(original: ParseCharError) -> ParseErrorKind
fn from(original: ParseCharError) -> ParseErrorKind
Converts to this type from the input type.
source§impl From<ParseComplexError> for ParseErrorKind
impl From<ParseComplexError> for ParseErrorKind
source§fn from(original: ParseComplexError) -> ParseErrorKind
fn from(original: ParseComplexError) -> ParseErrorKind
Converts to this type from the input type.
source§impl From<ParseNumberError> for ParseErrorKind
impl From<ParseNumberError> for ParseErrorKind
source§fn from(original: ParseNumberError) -> ParseErrorKind
fn from(original: ParseNumberError) -> ParseErrorKind
Converts to this type from the input type.
source§impl From<ParseStringError> for ParseErrorKind
impl From<ParseStringError> for ParseErrorKind
source§fn from(original: ParseStringError) -> ParseErrorKind
fn from(original: ParseStringError) -> ParseErrorKind
Converts to this type from the input type.
source§impl From<String> for ParseErrorKind
impl From<String> for ParseErrorKind
source§fn from(original: String) -> ParseErrorKind
fn from(original: String) -> ParseErrorKind
Converts to this type from the input type.
source§impl PartialEq for ParseErrorKind
impl PartialEq for ParseErrorKind
source§fn eq(&self, other: &ParseErrorKind) -> bool
fn eq(&self, other: &ParseErrorKind) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Eq for ParseErrorKind
impl StructuralPartialEq for ParseErrorKind
Auto Trait Implementations§
impl RefUnwindSafe for ParseErrorKind
impl Send for ParseErrorKind
impl Sync for ParseErrorKind
impl Unpin for ParseErrorKind
impl UnwindSafe for ParseErrorKind
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