pub struct UniqueOrDefaultViewMut<'v, T: Unique + Default>(/* private fields */);Expand description
Exclusive view over a unique storage of a component with a default value.
If the component is not already present, its default value will be inserted.
Trait Implementations§
Source§impl<'v, T: Unique + Default + Send + Sync> BorrowInfo for UniqueOrDefaultViewMut<'v, T>
impl<'v, T: Unique + Default + Send + Sync> BorrowInfo for UniqueOrDefaultViewMut<'v, T>
Source§fn borrow_info(info: &mut Vec<TypeInfo>)
fn borrow_info(info: &mut Vec<TypeInfo>)
This information is used during workload creation to determine which systems can run in parallel. Read more
Source§fn enable_tracking(
enable_tracking_fn: &mut Vec<fn(&AllStorages) -> Result<(), GetStorage>>,
)
fn enable_tracking( enable_tracking_fn: &mut Vec<fn(&AllStorages) -> Result<(), GetStorage>>, )
Enable tracking on the
World where this storage is borrowed.Source§impl<'view, 'de: 'view, T> Deserialize<'de> for UniqueOrDefaultViewMut<'view, T>
Available on crate feature serde1 only.
impl<'view, 'de: 'view, T> Deserialize<'de> for UniqueOrDefaultViewMut<'view, T>
Available on crate feature
serde1 only.Source§fn deserialize<D>(_deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(_deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl<'a, T: Unique + Default + Serialize> Serialize for UniqueOrDefaultViewMut<'a, T>
Available on crate feature serde1 only.
impl<'a, T: Unique + Default + Serialize> Serialize for UniqueOrDefaultViewMut<'a, T>
Available on crate feature
serde1 only.Source§impl<'v, T: Unique + Default + Send + Sync> WorldBorrow for UniqueOrDefaultViewMut<'v, T>
impl<'v, T: Unique + Default + Send + Sync> WorldBorrow for UniqueOrDefaultViewMut<'v, T>
type WorldView<'a> = UniqueOrDefaultViewMut<'a, T>
Source§fn world_borrow(
world: &World,
last_run: Option<TrackingTimestamp>,
current: TrackingTimestamp,
) -> Result<Self::WorldView<'_>, GetStorage>
fn world_borrow( world: &World, last_run: Option<TrackingTimestamp>, current: TrackingTimestamp, ) -> Result<Self::WorldView<'_>, GetStorage>
This function is where the actual borrowing happens.
Auto Trait Implementations§
impl<'v, T> Freeze for UniqueOrDefaultViewMut<'v, T>
impl<'v, T> RefUnwindSafe for UniqueOrDefaultViewMut<'v, T>where
T: RefUnwindSafe,
impl<'v, T> Send for UniqueOrDefaultViewMut<'v, T>where
T: Send,
impl<'v, T> Sync for UniqueOrDefaultViewMut<'v, T>where
T: Sync,
impl<'v, T> Unpin for UniqueOrDefaultViewMut<'v, T>
impl<'v, T> UnsafeUnpin for UniqueOrDefaultViewMut<'v, T>
impl<'v, T> !UnwindSafe for UniqueOrDefaultViewMut<'v, T>
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more