Expose fetch_id helper in window module
This commit is contained in:
parent
9f75f01ddb
commit
2c2421ae5d
1 changed files with 9 additions and 0 deletions
|
|
@ -95,3 +95,12 @@ pub fn change_always_on_top<Message>(on_top: bool) -> Command<Message> {
|
||||||
on_top,
|
on_top,
|
||||||
)))
|
)))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Fetches an identifier unique to the window.
|
||||||
|
pub fn fetch_id<Message>(
|
||||||
|
f: impl FnOnce(u64) -> Message + 'static,
|
||||||
|
) -> Command<Message> {
|
||||||
|
Command::single(command::Action::Window(window::Action::FetchId(Box::new(
|
||||||
|
f,
|
||||||
|
))))
|
||||||
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue