pub struct ParseResultWithErrors<T> {
pub value: Option<T>,
pub errors: Vec<ParseErrorSimple>,
}Expand description
A parser result type with error accumulation.
Fields§
§value: Option<T>§errors: Vec<ParseErrorSimple>Implementations§
Source§impl<T> ParseResultWithErrors<T>
impl<T> ParseResultWithErrors<T>
pub fn ok(value: T) -> Self
pub fn err(e: ParseErrorSimple) -> Self
pub fn ok_with_errors(value: T, errors: Vec<ParseErrorSimple>) -> Self
pub fn is_ok(&self) -> bool
pub fn has_errors(&self) -> bool
pub fn error_count(&self) -> usize
Auto Trait Implementations§
impl<T> Freeze for ParseResultWithErrors<T>where
T: Freeze,
impl<T> RefUnwindSafe for ParseResultWithErrors<T>where
T: RefUnwindSafe,
impl<T> Send for ParseResultWithErrors<T>where
T: Send,
impl<T> Sync for ParseResultWithErrors<T>where
T: Sync,
impl<T> Unpin for ParseResultWithErrors<T>where
T: Unpin,
impl<T> UnsafeUnpin for ParseResultWithErrors<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for ParseResultWithErrors<T>where
T: UnwindSafe,
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