pub struct SelFal<'f, D, F: Clone> { /* private fields */ }Implementations§
Source§impl<D, F: SelectableSource + Clone> SelFal<'static, D, F>
impl<D, F: SelectableSource + Clone> SelFal<'static, D, F>
Source§impl<'f, D, F: SelectableSource + Clone> SelFal<'f, D, F>
impl<'f, D, F: SelectableSource + Clone> SelFal<'f, D, F>
pub fn fallback(&'f self) -> &'f F
pub fn data(&self) -> &D
pub fn into_data(self) -> D
pub fn new_ref(data: D, fallback: &'f F) -> Self
pub fn new_cow(data: D, fallback: Cow<'f, F>) -> Self
pub fn with_ref_fallback<'g, G: SelectableSource + Clone>(
&self,
other_fallback: &'g G,
) -> SelFal<'g, D, G>where
D: Clone,
pub fn with_owned_fallback<G: SelectableSource + Clone>(
&self,
other_fallback: G,
) -> SelFal<'static, D, G>where
D: Clone,
pub fn map_data<X>(self, closure: impl FnOnce(D) -> X) -> SelFal<'f, X, F>
pub fn mutate_data(&mut self, closure: impl FnOnce(&mut D))
pub fn change_ref_fallback<'g, G: SelectableSource + Clone>( self, other_fallback: &'g G, ) -> SelFal<'g, D, G>
pub fn change_owned_fallback<G: SelectableSource + Clone>( self, other_fallback: G, ) -> SelFal<'static, D, G>
Trait Implementations§
impl<'f, D: Eq, F: Eq + Clone> Eq for SelFal<'f, D, F>
Source§impl<'f, D: Ord, F: Ord + Clone> Ord for SelFal<'f, D, F>
impl<'f, D: Ord, F: Ord + Clone> Ord for SelFal<'f, D, F>
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl<'f, D: PartialEq, F: PartialEq + Clone> PartialEq for SelFal<'f, D, F>
impl<'f, D: PartialEq, F: PartialEq + Clone> PartialEq for SelFal<'f, D, F>
Source§impl<'f, D: PartialOrd, F: PartialOrd + Clone> PartialOrd for SelFal<'f, D, F>
impl<'f, D: PartialOrd, F: PartialOrd + Clone> PartialOrd for SelFal<'f, D, F>
Source§impl<'f, D: SelectableSource, F: SelectableSource + Clone> SelectableSource for SelFal<'f, D, F>
impl<'f, D: SelectableSource, F: SelectableSource + Clone> SelectableSource for SelFal<'f, D, F>
Source§async fn request<'a>(
&'a self,
selector: &Selector,
allowed_features: Features,
) -> Result<Cow<'a, RuntimeAny>, FatalError>
async fn request<'a>( &'a self, selector: &Selector, allowed_features: Features, ) -> Result<Cow<'a, RuntimeAny>, FatalError>
This is a way to request the value for a selector
and explicitly state which
Features are allowed for the
specific evaluation at handfn enforce_required( required: Features, provided: Features, ) -> Result<(), FatalError>
fn mark_fallback_need<O>(selector: Selector) -> Result<O, FatalError>
impl<'f, D: PartialEq, F: PartialEq + Clone> StructuralPartialEq for SelFal<'f, D, F>
Auto Trait Implementations§
impl<'f, D, F> Freeze for SelFal<'f, D, F>
impl<'f, D, F> RefUnwindSafe for SelFal<'f, D, F>where
D: RefUnwindSafe,
F: RefUnwindSafe,
impl<'f, D, F> Send for SelFal<'f, D, F>
impl<'f, D, F> Sync for SelFal<'f, D, F>
impl<'f, D, F> Unpin for SelFal<'f, D, F>
impl<'f, D, F> UnsafeUnpin for SelFal<'f, D, F>where
D: UnsafeUnpin,
F: UnsafeUnpin,
impl<'f, D, F> UnwindSafe for SelFal<'f, D, F>
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<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.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