[][src]Enum polyhorn_core::Command

pub enum Command<P: ?Sized> where
    P: Platform
{ Mount(P::ContainerID, P::ContainerIDBox<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), }

A command that can be send from any thread and will be executed on the main thread.

Variants

Mount(P::ContainerID, P::ContainerIDBox<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> !RefUnwindSafe for Command<P>

impl<P: ?Sized> Send for Command<P> where
    <P as Platform>::ContainerID: Send

impl<P> !Sync for Command<P>

impl<P: ?Sized> Unpin for Command<P> where
    <P as Platform>::ContainerID: Unpin

impl<P> !UnwindSafe for Command<P>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.