dioxus_lib::prelude

Trait ReadableOptionExt

source
pub trait ReadableOptionExt<T>: Readable<Target = Option<T>>
where T: 'static,
{ // Provided methods fn unwrap(&self) -> T where T: Clone { ... } fn as_ref(&self) -> Option<<Self::Storage as AnyStorage>::Ref<'_, T>> { ... } }
Expand description

An extension trait for Readable<Option> that provides some convenience methods.

Provided Methods§

source

fn unwrap(&self) -> T
where T: Clone,

Unwraps the inner value and clones it.

source

fn as_ref(&self) -> Option<<Self::Storage as AnyStorage>::Ref<'_, T>>

Attempts to read the inner value of the Option.

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<T, R> ReadableOptionExt<T> for R
where T: 'static, R: Readable<Target = Option<T>>,