Trait cushy::widgets::label::DynamicDisplay
source · pub trait DynamicDisplay {
// Required method
fn fmt(&self, context: &WidgetContext<'_>, f: &mut Formatter<'_>) -> Result;
// Provided method
fn as_display<'display, 'ctx>(
&'display self,
context: &'display WidgetContext<'ctx>,
) -> DynamicDisplayer<'display, 'ctx>
where Self: Sized { ... }
}
Expand description
Required Methods§
sourcefn fmt(&self, context: &WidgetContext<'_>, f: &mut Formatter<'_>) -> Result
fn fmt(&self, context: &WidgetContext<'_>, f: &mut Formatter<'_>) -> Result
Format self
with any needed information from context
.
Provided Methods§
sourcefn as_display<'display, 'ctx>(
&'display self,
context: &'display WidgetContext<'ctx>,
) -> DynamicDisplayer<'display, 'ctx>where
Self: Sized,
fn as_display<'display, 'ctx>(
&'display self,
context: &'display WidgetContext<'ctx>,
) -> DynamicDisplayer<'display, 'ctx>where
Self: Sized,
Returns a type that implements Display
.