pub trait IntoEditor {
// Required method
fn into_editor(self) -> Box<dyn Editor>;
}Expand description
Fluent terminal for editor() impls: box any concrete editor into
the Box<dyn Editor> the trait returns, dropping the Box::new(…)
wrapper.
ⓘ
fn editor(&self) -> Box<dyn Editor> {
EguiEditor::new(self.params.clone(), (W, H), ui)
.with_visuals(theme)
.into_editor()
}Implemented for every Editor via a blanket impl and re-exported
from every truce::prelude*, so it’s in scope without an extra
import - egui / iced / slint / hand-rolled editors all use it.
Layout-only plugins use truce_gui::IntoLayoutEditor instead (its
into_editor takes &Arc<Params> and picks the built-in renderer).
Required Methods§
Sourcefn into_editor(self) -> Box<dyn Editor>
fn into_editor(self) -> Box<dyn Editor>
Box this editor into a Box<dyn Editor>.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".