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: usizeByte 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: ParseErrorKindDetails 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)>
Returns 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
impl Eq for ParseError
impl StructuralPartialEq for ParseError
Auto Trait Implementations§
impl Freeze for ParseError
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
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> ⓘ
Converts
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> ⓘ
Converts
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 more