pub struct Try;Expand description
try to parse
-
ParseErrorKind::Unmatchwill be transformed intoNone, -
ParseErrorKind::Semanticwill still beErr
so that you can use ? as usual after using match / if let ~
Trait Implementations§
Source§impl<P> ParseMapper<P> for Try
impl<P> ParseMapper<P> for Try
Source§fn map(self, result: Result<P, ParseError>) -> Result<Option<P>, ParseError>
fn map(self, result: Result<P, ParseError>) -> Result<Option<P>, ParseError>
map a
Result<P, ParseError> to ParseMapper::ResultAuto Trait Implementations§
impl Freeze for Try
impl RefUnwindSafe for Try
impl Send for Try
impl Sync for Try
impl Unpin for Try
impl UnsafeUnpin for Try
impl UnwindSafe for Try
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