Struct ark_api::world::EntityLayerMask
source · #[repr(transparent)]pub struct EntityLayerMask(_);Expand description
Represents an entity layer filter that can be used with entity queries or raycasts.
Implementations§
source§impl EntityLayerMask
impl EntityLayerMask
sourcepub const fn layer(layer: usize) -> Self
pub const fn layer(layer: usize) -> Self
Returns a new mask that includes only the given layer.
sourcepub const fn with(self, other: EntityLayerMask) -> Self
pub const fn with(self, other: EntityLayerMask) -> Self
Returns a new mask that includes the union of the layers of this mask and the other mask.
sourcepub const fn except(self, other: EntityLayerMask) -> Self
pub const fn except(self, other: EntityLayerMask) -> Self
Returns a new mask that includes the layers that this mask includes except the ones in the other mask.
sourcepub const fn with_layer(self, layer: usize) -> Self
pub const fn with_layer(self, layer: usize) -> Self
Returns a new mask that also includes the given layer.
sourcepub const fn except_layer(self, layer: usize) -> Self
pub const fn except_layer(self, layer: usize) -> Self
Returns a new mask that excludes the given layer. If the layer was already excluded from the mask this has no effect.
sourcepub const fn from_value(value: u64) -> Self
pub const fn from_value(value: u64) -> Self
Create from a raw mask value.
sourcepub const fn value(&self) -> u64
pub const fn value(&self) -> u64
Returns the raw mask value. Bits set to 1 indicate that the layer should be included.
sourcepub const fn everything() -> Self
pub const fn everything() -> Self
All layers.
Trait Implementations§
source§impl BitOr<EntityLayerMask> for EntityLayerMask
impl BitOr<EntityLayerMask> for EntityLayerMask
source§impl BitOrAssign<EntityLayerMask> for EntityLayerMask
impl BitOrAssign<EntityLayerMask> for EntityLayerMask
source§fn bitor_assign(&mut self, rhs: Self)
fn bitor_assign(&mut self, rhs: Self)
Returns a new mask that includes the union of the layers of this mask and the other mask.
Identical to EntityLayerMask::with.
source§impl Clone for EntityLayerMask
impl Clone for EntityLayerMask
source§fn clone(&self) -> EntityLayerMask
fn clone(&self) -> EntityLayerMask
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresource§impl Debug for EntityLayerMask
impl Debug for EntityLayerMask
source§impl<'de> Deserialize<'de> for EntityLayerMask
impl<'de> Deserialize<'de> for EntityLayerMask
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 Hash for EntityLayerMask
impl Hash for EntityLayerMask
source§impl PartialEq<EntityLayerMask> for EntityLayerMask
impl PartialEq<EntityLayerMask> for EntityLayerMask
source§fn eq(&self, other: &EntityLayerMask) -> bool
fn eq(&self, other: &EntityLayerMask) -> bool
This method tests for
self and other values to be equal, and is used
by ==.