pub struct TemplateFunction<P, F> {
pub property: P,
pub function: F,
}Expand description
Adapter to apply fallible function to the property.
This is usually created by TemplatePropertyExt::and_then()/map().
Fields§
§property: P§function: FImplementations§
Source§impl<P, F> TemplateFunction<P, F>
impl<P, F> TemplateFunction<P, F>
Trait Implementations§
Source§impl<O, P, F> TemplateProperty for TemplateFunction<P, F>
impl<O, P, F> TemplateProperty for TemplateFunction<P, F>
Auto Trait Implementations§
impl<P, F> Freeze for TemplateFunction<P, F>
impl<P, F> RefUnwindSafe for TemplateFunction<P, F>where
P: RefUnwindSafe,
F: RefUnwindSafe,
impl<P, F> Send for TemplateFunction<P, F>
impl<P, F> Sync for TemplateFunction<P, F>
impl<P, F> Unpin for TemplateFunction<P, F>
impl<P, F> UnwindSafe for TemplateFunction<P, F>where
P: UnwindSafe,
F: 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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<P> TemplatePropertyExt for Pwhere
P: TemplateProperty + ?Sized,
impl<P> TemplatePropertyExt for Pwhere
P: TemplateProperty + ?Sized,
Source§fn and_then<O, F>(self, function: F) -> TemplateFunction<Self, F>
fn and_then<O, F>(self, function: F) -> TemplateFunction<Self, F>
Translates to a property that will apply fallible
function to an
extracted value.Source§fn map<O, F>(self, function: F) -> impl TemplateProperty<Output = O>
fn map<O, F>(self, function: F) -> impl TemplateProperty<Output = O>
Translates to a property that will apply
function to an extracted
value, leaving Err untouched.Source§fn try_unwrap<O>(self, type_name: &str) -> impl TemplateProperty<Output = O>
fn try_unwrap<O>(self, type_name: &str) -> impl TemplateProperty<Output = O>
Translates to a property that will unwrap an extracted
Option value
of the specified type_name, mapping None to Err.Source§fn into_serialize<'a>(self) -> BoxedSerializeProperty<'a>
fn into_serialize<'a>(self) -> BoxedSerializeProperty<'a>
Converts this property into boxed serialize property.
Source§fn into_template<'a>(self) -> Box<dyn Template + 'a>
fn into_template<'a>(self) -> Box<dyn Template + 'a>
Converts this property into
Template.Source§fn into_dyn<'a>(self) -> BoxedTemplateProperty<'a, Self::Output>where
Self: Sized + 'a,
fn into_dyn<'a>(self) -> BoxedTemplateProperty<'a, Self::Output>where
Self: Sized + 'a,
Converts this property into boxed trait object.
Source§fn into_dyn_wrapped<'a, W>(self) -> W
fn into_dyn_wrapped<'a, W>(self) -> W
Converts this property into wrapped (or tagged) type. Read more