pub struct Startup {
pub opened_file: Option<PathBuf>,
}Expand description
Fired once per boot after Editor::boot returns. opened_file is the
path (if any) the renderer’s post-boot seam captured from the boot
Document before it moved into Editor::boot (which consumes it).
§Examples
use lattice_mode::Startup;
use lattice_runtime::EventBus;
let bus = EventBus::new();
let (tx, mut rx) = tokio::sync::mpsc::unbounded_channel();
bus.subscribe_typed::<Startup>(tx); // e.g. from a subsystem's `install`
bus.publish_typed(Startup { opened_file: None }); // the renderer, after boot
assert!(rx.try_recv().unwrap().opened_file.is_none()); // no file: show a dashboardFields§
§opened_file: Option<PathBuf>The file named on the command line, or None when the editor
started without one.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Startup
impl RefUnwindSafe for Startup
impl Send for Startup
impl Sync for Startup
impl Unpin for Startup
impl UnsafeUnpin for Startup
impl UnwindSafe for Startup
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more