pub struct Reopen { /* private fields */ }Expand description
A launch of a single-instance app (App::single_instance) while it’s
already running: the platform or the second process hands it to the
first, and on_reopen handlers get it there.
What’s in it is what the platform passes on: macOS gives no arguments
or folder to a running app, and Windows no folder.
Implementations§
Source§impl Reopen
impl Reopen
Sourcepub fn new(
args: Vec<String>,
cwd: Option<PathBuf>,
files: Vec<PathBuf>,
) -> Reopen
pub fn new( args: Vec<String>, cwd: Option<PathBuf>, files: Vec<PathBuf>, ) -> Reopen
What backends (and tests) hand the core: the launch’s arguments without the program, its working folder, and the files the platform opened the app with.
Sourcepub fn args(&self) -> &[String]
pub fn args(&self) -> &[String]
The arguments the app was launched with, without argv[0]. Empty
for a launch from the platform’s shell (macOS’s Dock and Finder).
Trait Implementations§
impl Eq for Reopen
impl StructuralPartialEq for Reopen
Auto Trait Implementations§
impl Forget for Reopen
impl Freeze for Reopen
impl Move for Reopen
impl RefUnwindSafe for Reopen
impl Send for Reopen
impl Sync for Reopen
impl Unpin for Reopen
impl UnsafeUnpin for Reopen
impl UnwindSafe for Reopen
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