pub struct SubstrParserError {
pub expected: usize,
pub current: usize,
}
Expand description
String parsing error for SubstrWrapper.
use substr_iterator::SubstrWrapper;
use std::str::FromStr;
let err = SubstrWrapper::<3>::from_str("abcd").unwrap_err();
assert_eq!(err.expected, 3);
assert_eq!(err.current, 4);
Fields§
§expected: usize
The expected number of characters
current: usize
The given number of characters in the &str
Trait Implementations§
Source§impl Clone for SubstrParserError
impl Clone for SubstrParserError
Source§fn clone(&self) -> SubstrParserError
fn clone(&self) -> SubstrParserError
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for SubstrParserError
impl Debug for SubstrParserError
Source§impl Display for SubstrParserError
impl Display for SubstrParserError
impl Copy for SubstrParserError
Auto Trait Implementations§
impl Freeze for SubstrParserError
impl RefUnwindSafe for SubstrParserError
impl Send for SubstrParserError
impl Sync for SubstrParserError
impl Unpin for SubstrParserError
impl UnwindSafe for SubstrParserError
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