#[repr(C, align(1))]pub struct BVec2 {
pub x: bool,
pub y: bool,
}Expand description
A 2-dimensional bool vector mask.
Fields§
§x: bool§y: boolImplementations§
Source§impl BVec2
impl BVec2
Sourcepub const fn from_array(a: [bool; 2]) -> BVec2
pub const fn from_array(a: [bool; 2]) -> BVec2
Creates a new vector mask from a bool array.
Sourcepub fn bitmask(self) -> u32
pub fn bitmask(self) -> u32
Returns a bitmask with the lowest 2 bits set from the elements of self.
A true element results in a 1 bit and a false element in a 0 bit. Element x goes
into the first lowest bit, element y into the second, etc.
Trait Implementations§
Source§impl BitAndAssign<&BVec2> for BVec2
impl BitAndAssign<&BVec2> for BVec2
Source§fn bitand_assign(&mut self, rhs: &BVec2)
fn bitand_assign(&mut self, rhs: &BVec2)
Performs the
&= operation. Read moreSource§impl BitAndAssign for BVec2
impl BitAndAssign for BVec2
Source§fn bitand_assign(&mut self, rhs: BVec2)
fn bitand_assign(&mut self, rhs: BVec2)
Performs the
&= operation. Read moreSource§impl BitOrAssign<&BVec2> for BVec2
impl BitOrAssign<&BVec2> for BVec2
Source§fn bitor_assign(&mut self, rhs: &BVec2)
fn bitor_assign(&mut self, rhs: &BVec2)
Performs the
|= operation. Read moreSource§impl BitOrAssign for BVec2
impl BitOrAssign for BVec2
Source§fn bitor_assign(&mut self, rhs: BVec2)
fn bitor_assign(&mut self, rhs: BVec2)
Performs the
|= operation. Read moreSource§impl BitXorAssign<&BVec2> for BVec2
impl BitXorAssign<&BVec2> for BVec2
Source§fn bitxor_assign(&mut self, rhs: &BVec2)
fn bitxor_assign(&mut self, rhs: &BVec2)
Performs the
^= operation. Read moreSource§impl BitXorAssign for BVec2
impl BitXorAssign for BVec2
Source§fn bitxor_assign(&mut self, rhs: BVec2)
fn bitxor_assign(&mut self, rhs: BVec2)
Performs the
^= operation. Read moreimpl Copy for BVec2
impl Eq for BVec2
impl StructuralPartialEq for BVec2
Auto Trait Implementations§
impl Freeze for BVec2
impl RefUnwindSafe for BVec2
impl Send for BVec2
impl Sync for BVec2
impl Unpin for BVec2
impl UnsafeUnpin for BVec2
impl UnwindSafe for BVec2
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> 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>
Convert
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>
Convert
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)
Convert
&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)
Convert
&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> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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
Compare self to
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> 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<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as
ReadEndian::read_from_little_endian().