pub struct Res<'resources, T: ?Sized + 'static, Tag: 'static = DefaultResourceTag> { /* private fields */ }Expand description
Shared view of one resource.
The resource type and optional tag identify the required capability in a
command signature. Res is a transparent borrowing wrapper and allocates
no memory.
Implementations§
Source§impl<'resources, T, Tag> Res<'resources, T, Tag>where
T: ?Sized + 'static,
Tag: 'static,
impl<'resources, T, Tag> Res<'resources, T, Tag>where
T: ?Sized + 'static,
Tag: 'static,
Sourcepub const fn into_inner(self) -> &'resources T
pub const fn into_inner(self) -> &'resources T
Returns the wrapped shared reference.
Trait Implementations§
impl<T, Tag> Copy for Res<'_, T, Tag>where
T: ?Sized + 'static,
Tag: 'static,
Source§impl<'param, R, T, Tag> SystemParam<R> for Res<'param, T, Tag>where
R: ResourceProvider<T, Tag>,
T: 'static,
Tag: 'static,
impl<'param, R, T, Tag> SystemParam<R> for Res<'param, T, Tag>where
R: ResourceProvider<T, Tag>,
T: 'static,
Tag: 'static,
Auto Trait Implementations§
impl<'resources, T, Tag> Freeze for Res<'resources, T, Tag>
impl<'resources, T, Tag> RefUnwindSafe for Res<'resources, T, Tag>
impl<'resources, T, Tag> Send for Res<'resources, T, Tag>
impl<'resources, T, Tag> Sync for Res<'resources, T, Tag>
impl<'resources, T, Tag> Unpin for Res<'resources, T, Tag>
impl<'resources, T, Tag> UnsafeUnpin for Res<'resources, T, Tag>
impl<'resources, T, Tag> UnwindSafe for Res<'resources, T, Tag>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more