pub struct OptionalAttr<T> { /* private fields */ }Expand description
Parser that gets an optional attribute
Trait Implementations§
Source§impl<T> Parser<Option<T>> for OptionalAttr<T>
impl<T> Parser<Option<T>> for OptionalAttr<T>
fn parse(&self, db: &dyn DwarfDb, entry: Die) -> Result<Option<T>>
Source§fn and<U, P>(self, other: P) -> And<Self, P, T, U>
fn and<U, P>(self, other: P) -> And<Self, P, T, U>
Combine this parser with another, applying both and combining results
Source§fn filter(self) -> Filter<Self>where
Self: Sized,
fn filter(self) -> Filter<Self>where
Self: Sized,
Turns the input into an optional output
if the provided parser succeeds
fn map_with_entry<U, F>(self, f: F) -> MapWithDbAndEntry<Self, F, T>
Auto Trait Implementations§
impl<T> Freeze for OptionalAttr<T>
impl<T> RefUnwindSafe for OptionalAttr<T>where
T: RefUnwindSafe,
impl<T> Send for OptionalAttr<T>where
T: Send,
impl<T> Sync for OptionalAttr<T>where
T: Sync,
impl<T> Unpin for OptionalAttr<T>where
T: Unpin,
impl<T> UnwindSafe for OptionalAttr<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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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