Skip to main content

ToolbarContent

Trait ToolbarContent 

Source
pub trait ToolbarContent<M> {
    // Required method
    fn into_source(self) -> ToolbarSource;
}
Expand description

Anything crate::Decorate::toolbar accepts: one entry, a list of them, or a closure that derives the list and re-runs whenever its reactive reads change.

The marker parameter M is what lets one method name take all three. A blanket impl over Fn() -> Vec<ToolbarEntry> and a concrete impl for Vec<ToolbarEntry> overlap as far as coherence can tell, since it will not assume Vec never gains an Fn impl. This is the same E0119 dodge as IntoText, and resolved the same way.

Required Methods§

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl ToolbarContent<ManyMark> for Vec<ToolbarEntry>

Source§

impl<const N: usize> ToolbarContent<ManyMark> for [ToolbarEntry; N]

Implementors§

Day API ↩ Guides· daybrite.dev