Trait vizia::context::DataContext
source · pub trait DataContext {
// Required method
fn data<T>(&self) -> Option<&T>
where T: 'static;
// Provided method
fn as_context(&self) -> Option<LocalizationContext<'_>> { ... }
}
Expand description
A trait for any Context-like object that lets you access stored model data.
This lets e.g Lens::get be generic over any of these types.
Required Methods§
Provided Methods§
fn as_context(&self) -> Option<LocalizationContext<'_>>
Object Safety§
This trait is not object safe.