mirror of
https://github.com/slint-ui/slint.git
synced 2025-10-01 06:11:16 +00:00
Link from the rust global docs to the singleton langref
This commit is contained in:
parent
85259b21b6
commit
c7ef3e0fb9
1 changed files with 2 additions and 0 deletions
|
@ -451,6 +451,8 @@ pub fn invoke_from_event_loop(func: impl FnOnce() + Send + 'static) {
|
|||
/// // alternate way to access the global:
|
||||
/// Palette::get(&app).set_foreground_color(sixtyfps::Color::from_rgb_u8(255, 255, 255));
|
||||
/// ```
|
||||
///
|
||||
/// See also the [language reference for globals](docs/langref/index.html#global-singletons) for more information.
|
||||
pub trait Global<'a, Component> {
|
||||
/// Returns a reference that's tied to the life time of the provided component.
|
||||
fn get(component: &'a Component) -> Self;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue