pub struct ResolvedWithFallback<T> {
pub value: T,
pub degraded: bool,
pub reason: Option<DegradationReason>,
pub label: Option<&'static str>,
}Fields§
§value: T§degraded: bool§reason: Option<DegradationReason>§label: Option<&'static str>Implementations§
Source§impl<T> ResolvedWithFallback<T>
impl<T> ResolvedWithFallback<T>
pub fn ok(value: T) -> Self
pub fn degraded( value: T, label: &'static str, reason: DegradationReason, ) -> Self
pub fn report_if_degraded<H: UiHost>(&self, app: &mut H)
Trait Implementations§
Source§impl<T: Clone> Clone for ResolvedWithFallback<T>
impl<T: Clone> Clone for ResolvedWithFallback<T>
Source§fn clone(&self) -> ResolvedWithFallback<T>
fn clone(&self) -> ResolvedWithFallback<T>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl<T> Freeze for ResolvedWithFallback<T>where
T: Freeze,
impl<T> RefUnwindSafe for ResolvedWithFallback<T>where
T: RefUnwindSafe,
impl<T> Send for ResolvedWithFallback<T>where
T: Send,
impl<T> Sync for ResolvedWithFallback<T>where
T: Sync,
impl<T> Unpin for ResolvedWithFallback<T>where
T: Unpin,
impl<T> UnsafeUnpin for ResolvedWithFallback<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for ResolvedWithFallback<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