pub struct TryList<T>(/* private fields */);Expand description
Attempts to render or extract contents in order, returns the first successful output.
Implementations§
Trait Implementations§
Source§impl<'a> AnyTemplateProperty<'a> for TryList<BoxedAnyProperty<'a>>
Converts type-erased properties if all items support the operation.
impl<'a> AnyTemplateProperty<'a> for TryList<BoxedAnyProperty<'a>>
Converts type-erased properties if all items support the operation.
fn try_into_serialize(self: Box<Self>) -> Option<BoxedSerializeProperty<'a>>
fn try_into_template(self: Box<Self>) -> Option<Box<dyn Template + 'a>>
Source§impl<T: TemplateProperty> TemplateProperty for TryList<T>
impl<T: TemplateProperty> TemplateProperty for TryList<T>
Auto Trait Implementations§
impl<T> Freeze for TryList<T>
impl<T> RefUnwindSafe for TryList<T>where
T: RefUnwindSafe,
impl<T> Send for TryList<T>where
T: Send,
impl<T> Sync for TryList<T>where
T: Sync,
impl<T> Unpin for TryList<T>where
T: Unpin,
impl<T> UnsafeUnpin for TryList<T>
impl<T> UnwindSafe for TryList<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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
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