pub enum Command<P>{
Mount(P::ContainerID, P::ContainerID, Box<dyn FnOnce(&mut P::Container, &mut P::Environment) -> P::Container + Send>),
Mutate(Vec<P::ContainerID>, Box<dyn FnOnce(&mut [&mut P::Container], &mut P::Environment) + Send>),
Unmount(P::ContainerID),
}
Expand description
A command that can be send from any thread and will be executed on the main thread.
Variants§
Mount(P::ContainerID, P::ContainerID, Box<dyn FnOnce(&mut P::Container, &mut P::Environment) -> P::Container + Send>)
Initializes the container that corresponds to the second container ID with the given initialization closure and mounts the second given container ID onto the first given container ID.
Mutate(Vec<P::ContainerID>, Box<dyn FnOnce(&mut [&mut P::Container], &mut P::Environment) + Send>)
Applies a closure to all containers with the given IDs.
Unmount(P::ContainerID)
Unmounts a container with the given ID.
Auto Trait Implementations§
impl<P> Freeze for Command<P>
impl<P> !RefUnwindSafe for Command<P>
impl<P> Send for Command<P>where
P: ?Sized,
impl<P> !Sync for Command<P>
impl<P> Unpin for Command<P>
impl<P> !UnwindSafe for Command<P>
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