pub struct FilteredAccessSet { /* private fields */ }
Expand description
A collection of FilteredAccess
instances.
Used internally to statically check if systems have conflicting access.
It stores multiple sets of accesses.
- A “combined” set, which is the access of all filters in this set combined.
- The set of access of each individual filters in this set.
Implementations§
Source§impl FilteredAccessSet
impl FilteredAccessSet
Sourcepub const fn new() -> FilteredAccessSet
pub const fn new() -> FilteredAccessSet
Creates an empty FilteredAccessSet
.
Sourcepub fn combined_access(&self) -> &Access
pub fn combined_access(&self) -> &Access
Returns a reference to the unfiltered access of the entire set.
Sourcepub fn is_compatible(&self, other: &FilteredAccessSet) -> bool
pub fn is_compatible(&self, other: &FilteredAccessSet) -> bool
Returns true
if this and other
can be active at the same time.
Access conflict resolution happen in two steps:
- A “coarse” check, if there is no mutual unfiltered conflict between
self
andother
, we already know that the two access sets are compatible. - A “fine grained” check, it kicks in when the “coarse” check fails.
the two access sets might still be compatible if some of the accesses
are restricted with the
With
orWithout
filters so that access is mutually exclusive. The fine grained phase iterates over all filters in theself
set and compares it to all the filters in theother
set, making sure they are all mutually compatible.
Sourcepub fn get_conflicts(&self, other: &FilteredAccessSet) -> AccessConflicts
pub fn get_conflicts(&self, other: &FilteredAccessSet) -> AccessConflicts
Returns a vector of elements that this set and other
cannot access at the same time.
Sourcepub fn get_conflicts_single(
&self,
filtered_access: &FilteredAccess,
) -> AccessConflicts
pub fn get_conflicts_single( &self, filtered_access: &FilteredAccess, ) -> AccessConflicts
Returns a vector of elements that this set and other
cannot access at the same time.
Sourcepub fn add(&mut self, filtered_access: FilteredAccess)
pub fn add(&mut self, filtered_access: FilteredAccess)
Adds the filtered access to the set.
Sourcepub fn add_unfiltered_resource_read(&mut self, index: ComponentId)
pub fn add_unfiltered_resource_read(&mut self, index: ComponentId)
Adds a read access to a resource to the set.
Sourcepub fn add_unfiltered_resource_write(&mut self, index: ComponentId)
pub fn add_unfiltered_resource_write(&mut self, index: ComponentId)
Adds a write access to a resource to the set.
Sourcepub fn add_unfiltered_read_all_resources(&mut self)
pub fn add_unfiltered_read_all_resources(&mut self)
Adds read access to all resources to the set.
Sourcepub fn add_unfiltered_write_all_resources(&mut self)
pub fn add_unfiltered_write_all_resources(&mut self)
Adds write access to all resources to the set.
Sourcepub fn extend(&mut self, filtered_access_set: FilteredAccessSet)
pub fn extend(&mut self, filtered_access_set: FilteredAccessSet)
Adds all of the accesses from the passed set to self
.
Trait Implementations§
Source§impl Clone for FilteredAccessSet
impl Clone for FilteredAccessSet
Source§fn clone(&self) -> FilteredAccessSet
fn clone(&self) -> FilteredAccessSet
Source§fn clone_from(&mut self, source: &FilteredAccessSet)
fn clone_from(&mut self, source: &FilteredAccessSet)
source
. Read moreSource§impl Debug for FilteredAccessSet
impl Debug for FilteredAccessSet
Source§impl Default for FilteredAccessSet
impl Default for FilteredAccessSet
Source§fn default() -> FilteredAccessSet
fn default() -> FilteredAccessSet
Source§impl From<FilteredAccess> for FilteredAccessSet
impl From<FilteredAccess> for FilteredAccessSet
Source§fn from(filtered_access: FilteredAccess) -> FilteredAccessSet
fn from(filtered_access: FilteredAccess) -> FilteredAccessSet
Source§impl PartialEq for FilteredAccessSet
impl PartialEq for FilteredAccessSet
impl Eq for FilteredAccessSet
impl StructuralPartialEq for FilteredAccessSet
Auto Trait Implementations§
impl Freeze for FilteredAccessSet
impl RefUnwindSafe for FilteredAccessSet
impl Send for FilteredAccessSet
impl Sync for FilteredAccessSet
impl Unpin for FilteredAccessSet
impl UnwindSafe for FilteredAccessSet
Blanket Implementations§
Source§impl<T, U> AsBindGroupShaderType<U> for T
impl<T, U> AsBindGroupShaderType<U> for T
Source§fn as_bind_group_shader_type(&self, _images: &RenderAssets<GpuImage>) -> U
fn as_bind_group_shader_type(&self, _images: &RenderAssets<GpuImage>) -> U
T
ShaderType
for self
. When used in AsBindGroup
derives, it is safe to assume that all images in self
exist.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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
, which can then be
downcast
into Box<dyn ConcreteType>
where ConcreteType
implements Trait
.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
, which can then be further
downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.Source§impl<T> DowncastSend for T
impl<T> DowncastSend for T
Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> FromWorld for Twhere
T: Default,
impl<T> FromWorld for Twhere
T: Default,
Source§fn from_world(_world: &mut World) -> T
fn from_world(_world: &mut World) -> T
Creates Self
using default()
.
Source§impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
Source§impl<T> Identity for Twhere
T: ?Sized,
impl<T> Identity for Twhere
T: ?Sized,
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> ⓘ
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> ⓘ
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