Struct legion::systems::SyncResources[][src]

pub struct SyncResources<'a> { /* fields omitted */ }

A resource collection which is Send and Sync, but which only allows access to resources which are Sync.

Implementations

impl<'a> SyncResources<'a>[src]

pub fn get<T: Resource + Sync>(&self) -> Option<AtomicRef<'_, T>>[src]

Retrieve an immutable reference to T from the store if it exists. Otherwise, return None.

Panics

Panics if the resource is already borrowed mutably.

pub fn get_mut<T: Resource + Send>(&self) -> Option<AtomicRefMut<'_, T>>[src]

Retrieve a mutable reference to T from the store if it exists. Otherwise, return None.

Auto Trait Implementations

impl<'a> !RefUnwindSafe for SyncResources<'a>

impl<'a> Send for SyncResources<'a>

impl<'a> Sync for SyncResources<'a>

impl<'a> Unpin for SyncResources<'a>

impl<'a> !UnwindSafe for SyncResources<'a>

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> Downcast for T where
    T: Any
[src]

impl<T> DowncastSync for T where
    T: Send + Sync + Any
[src]

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

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

impl<T> Pointable for T

type Init = T

The type for initializers.

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.