Skip to main content

EntityCommandOutput

Trait EntityCommandOutput 

pub trait EntityCommandOutput {
    type Out;
    type Error: Into<BevyError> + From<EntityMutableFetchError>;

    // Required method
    fn into_result(self) -> Result<Self::Out, Self::Error>;
}
Expand description

A trait implemented for types that can be used as the output of an EntityCommand.

Required Associated Types§

type Out

The type returned when the command is successfully applied.

type Error: Into<BevyError> + From<EntityMutableFetchError>

The error type returned when the command fails to apply. The type must be convertible into a BevyError and constructible from an EntityMutableFetchError.

Required Methods§

fn into_result(self) -> Result<Self::Out, Self::Error>

Converts the output into a Result containing either the successful output or an error.

Implementations on Foreign Types§

§

impl EntityCommandOutput for ()

§

impl<T, E> EntityCommandOutput for Result<T, E>
where E: Debug + Display + Send + Sync + 'static,

Implementors§