Skip to main content

ReadGlobal

Trait ReadGlobal 

Source
pub trait ReadGlobal {
    // Required method
    fn global(cx: &App) -> &Self;
}
Expand description

A trait for reading a global value from the context.

Required Methods§

Source

fn global(cx: &App) -> &Self

Returns the global instance of the implementing type.

Panics if a global for that type has not been assigned.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<T: Global> ReadGlobal for T