Type Alias DynResult

Source
pub type DynResult<T> = Result<T, Box<dyn Error + Send + Sync + 'static>>;
Expand description

A Result with super flexible error type Box<dyn Error + Send + Sync + 'static>.

Aliased Type§

pub enum DynResult<T> {
    Ok(T),
    Err(Box<dyn Error + Sync + Send>),
}

Variants§

§1.0.0

Ok(T)

Contains the success value

§1.0.0

Err(Box<dyn Error + Sync + Send>)

Contains the error value

Trait Implementations§

Source§

impl Command for DynResult<()>

Empty command.

This implementation helps clients to use ‘?’ operator in their command functions.

Source§

fn command(&mut self, _ecs: Ecs<'_>) -> DynResult<()>

A method accessing the whole ECS instance. Read more
Source§

fn cancel(&mut self)

Cancellation method which is called when the command cannot be executed for some reason. Read more
Source§

impl<F> Command for DynResult<F>
where F: FnOnce(Ecs<'_>) -> DynResult<()> + Send + 'static,

Source§

fn command(&mut self, ecs: Ecs<'_>) -> DynResult<()>

A method accessing the whole ECS instance. Read more
Source§

fn cancel(&mut self)

Cancellation method which is called when the command cannot be executed for some reason. Read more