pub(crate) struct Context {
pub(crate) app_context: Arc<RwLock<AppContext>>,
pub(crate) tree: RwLock<Tree>,
pub(crate) action_handler: Arc<dyn ActionHandlerNoMut + Send + Sync>,
pub(crate) root_window_bounds: RwLock<WindowBounds>,
}Fields§
§app_context: Arc<RwLock<AppContext>>§tree: RwLock<Tree>§action_handler: Arc<dyn ActionHandlerNoMut + Send + Sync>§root_window_bounds: RwLock<WindowBounds>Implementations§
Source§impl Context
impl Context
pub(crate) fn new( app_context: &Arc<RwLock<AppContext>>, tree: Tree, action_handler: Arc<dyn ActionHandlerNoMut + Send + Sync>, root_window_bounds: WindowBounds, ) -> Arc<Self>
pub(crate) fn read_tree(&self) -> RwLockReadGuard<'_, Tree>
pub(crate) fn read_root_window_bounds( &self, ) -> RwLockReadGuard<'_, WindowBounds>
pub fn do_action(&self, request: ActionRequest)
pub(crate) fn read_app_context(&self) -> RwLockReadGuard<'_, AppContext>
pub(crate) fn write_app_context(&self) -> RwLockWriteGuard<'_, AppContext>
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for Context
impl !RefUnwindSafe for Context
impl Send for Context
impl Sync for Context
impl Unpin for Context
impl !UnwindSafe for Context
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more