Skip to main content

EntityCommandOutput

Trait EntityCommandOutput 

Source
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§

Source

type Out

The type returned when the command is successfully applied.

Source

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§

Source

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

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

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl EntityCommandOutput for ()

Source§

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

Implementors§