[][src]Struct goggles::resource_set::ResourceSet

pub struct ResourceSet { /* fields omitted */ }

Store a set of arbitrary types inside AtomicRefCells, and then access them for either reading or writing.

Implementations

impl ResourceSet[src]

pub fn new() -> Self[src]

pub fn insert<T>(&mut self, r: T) -> Option<T> where
    T: Send + 'static, 
[src]

pub fn remove<T>(&mut self) -> Option<T> where
    T: Send + 'static, 
[src]

pub fn contains<T>(&self) -> bool where
    T: Send + 'static, 
[src]

pub fn borrow<T>(&self) -> AtomicRef<'_, T> where
    T: Send + Sync + 'static, 
[src]

Borrow the given resource immutably.

Panics

Panics if the resource has not been inserted or is already borrowed mutably.

pub fn borrow_mut<T>(&self) -> AtomicRefMut<'_, T> where
    T: Send + 'static, 
[src]

Borrow the given resource mutably.

Panics

Panics if the resource has not been inserted or is already borrowed.

pub fn get_mut<T>(&mut self) -> &mut T where
    T: Send + 'static, 
[src]

Panics

Panics if the resource has not been inserted.

pub fn fetch<'a, F>(&'a self) -> F where
    F: FetchResources<'a, Source = ResourceSet, Resources = RwResources<ResourceId>>, 
[src]

Fetch the given FetchResources.

Trait Implementations

impl Default for ResourceSet[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Any for T where
    T: Any
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[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.