[−][src]Enum ldap3::asn1::IResult
Holds the result of parsing functions
It depends on I, the input type, O, the output type, and E, the error type (by default u32)
Variants
indicates a correct parsing, the first field containing the rest of the unparsed data, the second field contains the parsed data
Error(ErrorKind<E>)
contains a Err, an enum that can indicate an error code, a position in the input, and a pointer to another error, making a list of errors in the parsing tree
Incomplete(Needed)
Incomplete contains a Needed, an enum than can represent a known quantity of input data, or unknown
Implementations
impl<I, O, E> IResult<I, O, E>
[src]
pub fn map_err<N, F>(self, f: F) -> IResult<I, O, N> where
F: FnOnce(ErrorKind<E>) -> ErrorKind<N>,
[src]
F: FnOnce(ErrorKind<E>) -> ErrorKind<N>,
Maps a IResult<I, O, E>
to IResult<I, O, N>
by appling a function
to a contained Error
value, leaving Done
and Incomplete
value
untouched.
pub fn unwrap_err(self) -> ErrorKind<E>
[src]
Unwrap the contained Error(E)
value, or panic if the IResult
is not
Error
.
pub fn to_full_result(self) -> Result<O, IError<E>>
[src]
Convert the IResult to a std::result::Result
pub fn to_result(self) -> Result<O, ErrorKind<E>>
[src]
Convert the IResult to a std::result::Result, or panic if the IResult
is Incomplete
impl<I, O, E> IResult<I, O, E>
[src]
pub fn is_done(&self) -> bool
[src]
pub fn is_err(&self) -> bool
[src]
pub fn is_incomplete(&self) -> bool
[src]
pub fn or(self, other: IResult<I, O, E>) -> IResult<I, O, E>
[src]
pub fn map<N, F>(self, f: F) -> IResult<I, N, E> where
F: FnOnce(O) -> N,
[src]
F: FnOnce(O) -> N,
Maps a IResult<I, O, E>
to IResult<I, N, E>
by appling a function
to a contained Done
value, leaving Error
and Incomplete
value
untouched.
pub fn map_inc<F>(self, f: F) -> IResult<I, O, E> where
F: FnOnce(Needed) -> Needed,
[src]
F: FnOnce(Needed) -> Needed,
Maps a IResult<I, O, E>
to IResult<I, O, E>
by appling a function
to a contained Incomplete
value, leaving Done
and Error
value
untouched.
pub fn unwrap(self) -> (I, O)
[src]
Unwrap the contained Done(I, O)
value, or panic if the IResult
is not
Done
.
pub fn unwrap_inc(self) -> Needed
[src]
Unwrap the contained Incomplete(n)
value, or panic if the IResult
is not
Incomplete
.
Trait Implementations
impl<I, O, E> Clone for IResult<I, O, E> where
E: Clone,
I: Clone,
O: Clone,
[src]
E: Clone,
I: Clone,
O: Clone,
impl<I, O, E> Debug for IResult<I, O, E> where
E: Debug,
I: Debug,
O: Debug,
[src]
E: Debug,
I: Debug,
O: Debug,
impl<I, O, E> Eq for IResult<I, O, E> where
E: Eq,
I: Eq,
O: Eq,
[src]
E: Eq,
I: Eq,
O: Eq,
impl<'a, I, O, E> GetInput<&'a [I]> for IResult<&'a [I], O, E>
[src]
pub fn remaining_input(&self) -> Option<&'a [I]>
[src]
impl<'a, O, E> GetInput<&'a str> for IResult<&'a str, O, E>
[src]
pub fn remaining_input(&self) -> Option<&'a str>
[src]
impl<O, E> GetInput<()> for IResult<(), O, E>
[src]
pub fn remaining_input(&self) -> Option<()>
[src]
impl<'a, I, O, E> GetOutput<&'a [O]> for IResult<I, &'a [O], E>
[src]
impl<'a, I, E> GetOutput<&'a str> for IResult<I, &'a str, E>
[src]
impl<I, E> GetOutput<()> for IResult<I, (), E>
[src]
impl<I, O, E> PartialEq<IResult<I, O, E>> for IResult<I, O, E> where
E: PartialEq<E>,
I: PartialEq<I>,
O: PartialEq<O>,
[src]
E: PartialEq<E>,
I: PartialEq<I>,
O: PartialEq<O>,
pub fn eq(&self, other: &IResult<I, O, E>) -> bool
[src]
pub fn ne(&self, other: &IResult<I, O, E>) -> bool
[src]
impl<I, O, E> StructuralEq for IResult<I, O, E>
[src]
impl<I, O, E> StructuralPartialEq for IResult<I, O, E>
[src]
Auto Trait Implementations
impl<I, O, E> RefUnwindSafe for IResult<I, O, E> where
E: RefUnwindSafe,
I: RefUnwindSafe,
O: RefUnwindSafe,
[src]
E: RefUnwindSafe,
I: RefUnwindSafe,
O: RefUnwindSafe,
impl<I, O, E> Send for IResult<I, O, E> where
E: Send,
I: Send,
O: Send,
[src]
E: Send,
I: Send,
O: Send,
impl<I, O, E> Sync for IResult<I, O, E> where
E: Sync,
I: Sync,
O: Sync,
[src]
E: Sync,
I: Sync,
O: Sync,
impl<I, O, E> Unpin for IResult<I, O, E> where
E: Unpin,
I: Unpin,
O: Unpin,
[src]
E: Unpin,
I: Unpin,
O: Unpin,
impl<I, O, E> UnwindSafe for IResult<I, O, E> where
E: UnwindSafe,
I: UnwindSafe,
O: UnwindSafe,
[src]
E: UnwindSafe,
I: UnwindSafe,
O: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,