Struct scale_value::stringify::ParseError
source · pub struct ParseError {
pub start_loc: usize,
pub end_loc: Option<usize>,
pub err: ParseErrorKind,
}
Expand description
An error parsing the provided string into a Value
Fields§
§start_loc: usize
Byte offset into the provided string that the error begins.
end_loc: Option<usize>
Byte offset into the provided string that the error ends. Many errors begin at some point but do not have a known end position.
err: ParseErrorKind
Details about the error that occurred.
Implementations§
source§impl ParseError
impl ParseError
sourcepub fn new_at<E: Into<ParseErrorKind>>(err: E, loc: usize) -> Self
pub fn new_at<E: Into<ParseErrorKind>>(err: E, loc: usize) -> Self
Construct a new ParseError
for tokens at the given location.
sourcepub fn new_between<E: Into<ParseErrorKind>>(
err: E,
start: usize,
end: usize
) -> Self
pub fn new_between<E: Into<ParseErrorKind>>( err: E, start: usize, end: usize ) -> Self
Construct a new ParseError
for tokens between the given locations.
Trait Implementations§
source§impl Debug for ParseError
impl Debug for ParseError
source§impl Display for ParseError
impl Display for ParseError
source§impl Error for ParseError
impl Error for ParseError
1.30.0 · source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
1.0.0 · source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
source§impl PartialEq for ParseError
impl PartialEq for ParseError
source§fn eq(&self, other: &ParseError) -> bool
fn eq(&self, other: &ParseError) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Eq for ParseError
impl StructuralPartialEq for ParseError
Auto Trait Implementations§
impl RefUnwindSafe for ParseError
impl Send for ParseError
impl Sync for ParseError
impl Unpin for ParseError
impl UnwindSafe for ParseError
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