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
sourceimpl 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
sourceimpl BitOr<EntityLayerMask> for EntityLayerMask
impl BitOr<EntityLayerMask> for EntityLayerMask
sourcefn bitor(self, rhs: Self) -> Self::Output
fn bitor(self, rhs: Self) -> Self::Output
Returns a new mask that includes the union of the layers of this mask and the other mask.
Identical to EntityLayerMask::with.
type Output = EntityLayerMask
type Output = EntityLayerMask
The resulting type after applying the | operator.
sourceimpl BitOrAssign<EntityLayerMask> for EntityLayerMask
impl BitOrAssign<EntityLayerMask> for EntityLayerMask
sourcefn 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.
sourceimpl Clone for EntityLayerMask
impl Clone for EntityLayerMask
sourcefn clone(&self) -> EntityLayerMask
fn clone(&self) -> EntityLayerMask
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more
sourceimpl Debug for EntityLayerMask
impl Debug for EntityLayerMask
sourceimpl<'de> Deserialize<'de> for EntityLayerMask
impl<'de> Deserialize<'de> for EntityLayerMask
sourcefn 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
sourceimpl Hash for EntityLayerMask
impl Hash for EntityLayerMask
sourceimpl PartialEq<EntityLayerMask> for EntityLayerMask
impl PartialEq<EntityLayerMask> for EntityLayerMask
sourcefn 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 ==. Read more
sourcefn ne(&self, other: &EntityLayerMask) -> bool
fn ne(&self, other: &EntityLayerMask) -> bool
This method tests for !=.
sourceimpl<'a_, C_: Context> Readable<'a_, C_> for EntityLayerMask
impl<'a_, C_: Context> Readable<'a_, C_> for EntityLayerMask
fn read_from<R_: Reader<'a_, C_>>(_reader_: &mut R_) -> Result<Self, C_::Error>
fn minimum_bytes_needed() -> usize
fn read_from_buffer_with_ctx(
context: C,
buffer: &'a [u8]
) -> Result<Self, <C as Context>::Error>
fn read_with_length_from_buffer_with_ctx(
context: C,
buffer: &'a [u8]
) -> (Result<Self, <C as Context>::Error>, usize)
fn read_from_buffer_copying_data_with_ctx(
context: C,
buffer: &[u8]
) -> Result<Self, <C as Context>::Error>
fn read_with_length_from_buffer_copying_data_with_ctx(
context: C,
buffer: &[u8]
) -> (Result<Self, <C as Context>::Error>, usize)
fn read_with_length_from_buffer_copying_data_with_ctx_mut(
context: &mut C,
buffer: &[u8]
) -> (Result<Self, <C as Context>::Error>, usize)
fn read_from_stream_unbuffered_with_ctx<S>(
context: C,
stream: S
) -> Result<Self, <C as Context>::Error> where
S: Read,
fn read_from_stream_buffered_with_ctx<S>(
context: C,
stream: S
) -> Result<Self, <C as Context>::Error> where
S: Read,
fn read_from_file_with_ctx(
context: C,
path: impl AsRef<Path>
) -> Result<Self, <C as Context>::Error>
sourceimpl Serialize for EntityLayerMask
impl Serialize for EntityLayerMask
sourceimpl<C_: Context> Writable<C_> for EntityLayerMask
impl<C_: Context> Writable<C_> for EntityLayerMask
fn write_to<T_: ?Sized + Writer<C_>>(
&self,
_writer_: &mut T_
) -> Result<(), C_::Error>
fn write_to_buffer_with_ctx(
&self,
context: C,
buffer: &mut [u8]
) -> Result<(), <C as Context>::Error>
fn write_to_buffer_with_ctx_mut(
&self,
context: &mut C,
buffer: &mut [u8]
) -> Result<(), <C as Context>::Error>
fn write_to_vec_with_ctx(
&self,
context: C
) -> Result<Vec<u8, Global>, <C as Context>::Error>
fn write_to_vec_with_ctx_mut(
&self,
context: &mut C
) -> Result<Vec<u8, Global>, <C as Context>::Error>
fn write_to_stream_with_ctx<S>(
&self,
context: C,
stream: S
) -> Result<(), <C as Context>::Error> where
S: Write,
fn write_to_file_with_ctx(
&self,
context: C,
path: impl AsRef<Path>
) -> Result<(), <C as Context>::Error>
fn bytes_needed(&self) -> Result<usize, <C as Context>::Error>
impl Copy for EntityLayerMask
impl Eq for EntityLayerMask
impl StructuralEq for EntityLayerMask
impl StructuralPartialEq for EntityLayerMask
Auto Trait Implementations
impl RefUnwindSafe for EntityLayerMask
impl Send for EntityLayerMask
impl Sync for EntityLayerMask
impl Unpin for EntityLayerMask
impl UnwindSafe for EntityLayerMask
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
