Struct shipyard::UniqueView
source · pub struct UniqueView<'a, T: Unique> { /* private fields */ }
Expand description
Shared view over a unique component storage.
Implementations§
source§impl<T: Unique> UniqueView<'_, T>
impl<T: Unique> UniqueView<'_, T>
sourcepub fn clone(unique: &Self) -> Self
pub fn clone(unique: &Self) -> Self
Duplicates the UniqueView
.
source§impl<T: Unique> UniqueView<'_, T>
impl<T: Unique> UniqueView<'_, T>
sourcepub fn is_inserted(&self) -> bool
pub fn is_inserted(&self) -> bool
Returns true
if the component was inserted before the last clear_inserted
call.
sourcepub fn is_modified(&self) -> bool
pub fn is_modified(&self) -> bool
Returns true
is the component was modified since the last clear_modified
call.
sourcepub fn is_inserted_or_modified(&self) -> bool
pub fn is_inserted_or_modified(&self) -> bool
Returns true
if the component was inserted or modified since the last clear_inserted
or clear_modified
call.
Trait Implementations§
source§impl<T: Unique> AsRef<T> for UniqueView<'_, T>
impl<T: Unique> AsRef<T> for UniqueView<'_, T>
source§impl<'a, T: Send + Sync + Unique> BorrowInfo for UniqueView<'a, T>
impl<'a, T: Send + Sync + Unique> BorrowInfo for UniqueView<'a, T>
source§impl<T: Unique> Deref for UniqueView<'_, T>
impl<T: Unique> Deref for UniqueView<'_, T>
source§impl<T: Send + Sync + Unique> IntoBorrow for UniqueView<'_, T>
impl<T: Send + Sync + Unique> IntoBorrow for UniqueView<'_, T>
§type Borrow = UniqueViewBorrower<T>
type Borrow = UniqueViewBorrower<T>
Helper type almost allowing GAT on stable.
Auto Trait Implementations§
impl<'a, T> Freeze for UniqueView<'a, T>
impl<'a, T> RefUnwindSafe for UniqueView<'a, T>where
T: RefUnwindSafe,
impl<'a, T> Send for UniqueView<'a, T>where
T: Sync,
impl<'a, T> Sync for UniqueView<'a, T>where
T: Sync,
impl<'a, T> Unpin for UniqueView<'a, T>
impl<'a, T> UnwindSafe for UniqueView<'a, T>where
T: RefUnwindSafe,
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