Trait amethyst::ecs::shred::Resource[]

pub trait Resource: 'static + Send + Sync + Any { }

A resource defines a set of data which can only be accessed according to Rust's typical borrowing model (one writer xor multiple readers).

Methods

impl Resource + 'static

Returns the boxed value if it is of type T, or Err(Self) if it isn't.

Important traits for Box<R>

Returns the boxed value, blindly assuming it to be of type T. If you are not absolutely certain of T, you must not call this.

impl Resource + 'static

Returns true if the boxed type is the same as T

Returns some reference to the boxed value if it is of type T, or None if it isn't.

Important traits for &'a mut R

Returns a reference to the boxed value, blindly assuming it to be of type T. If you are not absolutely certain of T, you must not call this.

Returns some mutable reference to the boxed value if it is of type T, or None if it isn't.

Important traits for &'a mut R

Returns a mutable reference to the boxed value, blindly assuming it to be of type T. If you are not absolutely certain of T, you must not call this.

Implementors