Struct app_world::AppWorldWrapper
source · [−]pub struct AppWorldWrapper<W: AppWorld + 'static> { /* private fields */ }
Expand description
Holds application state and resources and will trigger a re-render after .msg() calls. See the crate level documentation for more details.
Cloning
Cloning an AppWorldWrapper
is a very cheap operation.
It can be useful to clone AppWorldWrapper
’s in order to pass the world into event handler
closures.
All clones hold pointers to the same inner state.
Implementations
sourceimpl<W: AppWorld + 'static> AppWorldWrapper<W>
impl<W: AppWorld + 'static> AppWorldWrapper<W>
sourcepub fn read(&self) -> RwLockReadGuard<'_, WorldWithMessageBuffer<W>>
pub fn read(&self) -> RwLockReadGuard<'_, WorldWithMessageBuffer<W>>
Acquire read access to AppWorld.
Trait Implementations
sourceimpl<W: AppWorld + 'static> Clone for AppWorldWrapper<W>
impl<W: AppWorld + 'static> Clone for AppWorldWrapper<W>
impl<W: AppWorld + 'static> Copy for AppWorldWrapper<W>
Auto Trait Implementations
impl<W> RefUnwindSafe for AppWorldWrapper<W>
impl<W> Send for AppWorldWrapper<W> where
W: Send + Sync,
impl<W> Sync for AppWorldWrapper<W> where
W: Send + Sync,
impl<W> Unpin for AppWorldWrapper<W>
impl<W> UnwindSafe for AppWorldWrapper<W>
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
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more