pub enum FastResult<T, E> {
ConsumedOk(T),
EmptyOk(T),
ConsumedErr(E),
EmptyErr(Tracked<E>),
}
Variants§
Implementations§
Source§impl<T, E> FastResult<T, E>
impl<T, E> FastResult<T, E>
Source§impl<T, E> FastResult<T, E>
impl<T, E> FastResult<T, E>
pub fn map<F, T2>(self, f: F) -> FastResult<F::Output, E>where
F: FnOnce(T) -> T2,
Trait Implementations§
Source§impl<T: Clone, E: Clone> Clone for FastResult<T, E>
impl<T: Clone, E: Clone> Clone for FastResult<T, E>
Source§fn clone(&self) -> FastResult<T, E>
fn clone(&self) -> FastResult<T, E>
Returns a copy 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<O, E> From<Result<(O, Consumed<()>), Consumed<Tracked<E>>>> for FastResult<O, E>
impl<O, E> From<Result<(O, Consumed<()>), Consumed<Tracked<E>>>> for FastResult<O, E>
Source§fn from(result: ParseResult2<O, E>) -> FastResult<O, E>
fn from(result: ParseResult2<O, E>) -> FastResult<O, E>
Converts to this type from the input type.
Source§impl<O, E> Into<Result<(O, Consumed<()>), Consumed<Tracked<E>>>> for FastResult<O, E>
impl<O, E> Into<Result<(O, Consumed<()>), Consumed<Tracked<E>>>> for FastResult<O, E>
Source§fn into(self) -> ParseResult2<O, E>
fn into(self) -> ParseResult2<O, E>
Converts this type into the (usually inferred) input type.
impl<T: Copy, E: Copy> Copy for FastResult<T, E>
impl<T, E> StructuralPartialEq for FastResult<T, E>
Auto Trait Implementations§
impl<T, E> Freeze for FastResult<T, E>
impl<T, E> RefUnwindSafe for FastResult<T, E>where
T: RefUnwindSafe,
E: RefUnwindSafe,
impl<T, E> Send for FastResult<T, E>
impl<T, E> Sync for FastResult<T, E>
impl<T, E> Unpin for FastResult<T, E>
impl<T, E> UnwindSafe for FastResult<T, E>where
T: UnwindSafe,
E: 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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