[−][src]Struct goggles::resource_set::ResourceSet
Store a set of arbitrary types inside AtomicRefCell
s, 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]
T: Send + 'static,
pub fn remove<T>(&mut self) -> Option<T> where
T: Send + 'static,
[src]
T: Send + 'static,
pub fn contains<T>(&self) -> bool where
T: Send + 'static,
[src]
T: Send + 'static,
pub fn borrow<T>(&self) -> AtomicRef<'_, T> where
T: Send + Sync + 'static,
[src]
T: Send + Sync + 'static,
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]
T: Send + 'static,
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]
T: Send + 'static,
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]
F: FetchResources<'a, Source = ResourceSet, Resources = RwResources<ResourceId>>,
Fetch the given FetchResources
.
Trait Implementations
impl Default for ResourceSet
[src]
Auto Trait Implementations
impl !RefUnwindSafe for ResourceSet
impl Send for ResourceSet
impl Sync for ResourceSet
impl Unpin for ResourceSet
impl !UnwindSafe for ResourceSet
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Any for T where
T: Any,
[src]
T: Any,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Pointable for T
pub const ALIGN: usize
type Init = T
The type for initializers.
pub unsafe fn init(init: <T as Pointable>::Init) -> usize
pub unsafe fn deref<'a>(ptr: usize) -> &'a T
pub unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T
pub unsafe fn drop(ptr: usize)
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,