Skip to main content

ResMut

Struct ResMut 

Source
pub struct ResMut<'resources, T: ?Sized + 'static, Tag: 'static = DefaultResourceTag> { /* private fields */ }
Expand description

Exclusive view of one resource.

The resource type and optional tag identify the required capability in a command signature. ResMut is a transparent borrowing wrapper and allocates no memory.

Implementations§

Source§

impl<'resources, T, Tag> ResMut<'resources, T, Tag>
where T: ?Sized + 'static, Tag: 'static,

Source

pub fn into_inner(self) -> &'resources mut T

Returns the wrapped exclusive reference.

Trait Implementations§

Source§

impl<T, Tag> Debug for ResMut<'_, T, Tag>
where T: Debug + ?Sized + 'static, Tag: 'static,

Source§

fn fmt(&self, formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<T, Tag> Deref for ResMut<'_, T, Tag>
where T: ?Sized + 'static, Tag: 'static,

Source§

type Target = T

The resulting type after dereferencing.
Source§

fn deref(&self) -> &Self::Target

Dereferences the value.
Source§

impl<T, Tag> DerefMut for ResMut<'_, T, Tag>
where T: ?Sized + 'static, Tag: 'static,

Source§

fn deref_mut(&mut self) -> &mut Self::Target

Mutably dereferences the value.
Source§

impl<'param, R, T, Tag> SystemParam<R> for ResMut<'param, T, Tag>
where R: ResourceProvider<T, Tag>, T: 'static, Tag: 'static,

Source§

const ACCESS: ResourceAccess

Memory access performed by this parameter.
Source§

type Item<'resources> = ResMut<'resources, T, Tag>

Argument passed to the command for one resource-container lifetime.
Source§

unsafe fn fetch<'resources>( resources: *mut R, ) -> Result<Self::Item<'resources>, FetchError>

Extracts the command argument from resources. Read more

Auto Trait Implementations§

§

impl<'resources, T, Tag = DefaultResourceTag> !UnwindSafe for ResMut<'resources, T, Tag>

§

impl<'resources, T, Tag> Freeze for ResMut<'resources, T, Tag>

§

impl<'resources, T, Tag> RefUnwindSafe for ResMut<'resources, T, Tag>

§

impl<'resources, T, Tag> Send for ResMut<'resources, T, Tag>
where &'resources mut T: Send, PhantomData<fn() -> Tag>: Send, T: ?Sized,

§

impl<'resources, T, Tag> Sync for ResMut<'resources, T, Tag>
where &'resources mut T: Sync, PhantomData<fn() -> Tag>: Sync, T: ?Sized,

§

impl<'resources, T, Tag> Unpin for ResMut<'resources, T, Tag>
where &'resources mut T: Unpin, PhantomData<fn() -> Tag>: Unpin, T: ?Sized,

§

impl<'resources, T, Tag> UnsafeUnpin for ResMut<'resources, T, Tag>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<P, T> Receiver for P
where P: Deref<Target = T> + ?Sized, T: ?Sized,

Source§

type Target = T

🔬This is a nightly-only experimental API. (arbitrary_self_types)
The target type on which the method may be called.
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.