pub struct FakeServicesHandle { /* private fields */ }Expand description
The test’s side of FakeServices.
Implementations§
Source§impl FakeServicesHandle
impl FakeServicesHandle
pub fn clipboard(&self) -> Option<String>
Sourcepub fn set_clipboard(&self, text: &str)
pub fn set_clipboard(&self, text: &str)
Puts text on the fake clipboard, as if copied from another app.
Sourcepub fn take_alert(&self) -> Option<PendingAlert>
pub fn take_alert(&self) -> Option<PendingAlert>
The oldest alert still waiting for an answer.
pub fn take_open_file(&self) -> Option<PendingOpen>
pub fn take_save_file(&self) -> Option<PendingSave>
Sourcepub fn take_trash(&self) -> Option<PendingTrash>
pub fn take_trash(&self) -> Option<PendingTrash>
The oldest request to trash items. Nothing has been moved: the test does what it wants the platform to have done, then answers.
Sourcepub fn take_launch(&self) -> Option<PendingLaunch>
pub fn take_launch(&self) -> Option<PendingLaunch>
The oldest request to open something in another app.
Sourcepub fn pending_requests(&self) -> usize
pub fn pending_requests(&self) -> usize
Requests of any kind still waiting for an answer.
The menus the app installed.
A window’s own menus (a MenuBar in its content), without the app’s.
The item at path, e.g. ["File", "Open Recent", "notes.txt"]:
a menu, its submenus, then the item’s title. Looks in the app’s
menus, then in each window’s.
Chooses the item at path (see menu_item),
like a click or its shortcut would. Returns false if there is no
such item or it is disabled.