pub struct Context { /* private fields */ }
Expand description
The Context stores all UI state. A user of the library shouldn’t have to interact with it directly.
Implementations
sourceimpl Context
impl Context
pub fn new(event_loop_proxy: Option<EventLoopProxy<()>>, window: Window) -> Self
pub fn with_state<S: Clone + 'static, R, F: Fn(State<S>, &mut Self) -> R>(
&mut self,
default: S,
id: ViewID,
f: F
) -> R
pub fn with_state_mut<S: Clone + 'static, R, F: FnMut(State<S>, &mut Self) -> R>(
&mut self,
default: S,
id: ViewID,
f: &mut F
) -> R
pub fn with_state_aux<S: Clone + 'static, T, R, F: Fn(State<S>, &mut Self, &mut T) -> R>(
&mut self,
default: S,
id: ViewID,
aux: &mut T,
f: F
) -> R
Auto Trait Implementations
impl !RefUnwindSafe for Context
impl !Send for Context
impl !Sync for Context
impl Unpin for Context
impl !UnwindSafe for Context
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more