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§
fn into_source(self) -> ToolbarSource
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".