Struct BitAnd

Source
pub struct BitAnd<T, U>(/* private fields */);
Expand description

The result of BitsExt::bit_and.

The resulting bit vector adapter ands the bits of the two underlying bit-vector-likes.

Trait Implementations§

Source§

impl<Block, R, T, U> BitSliceable<R> for BitAnd<T, U>
where Block: BlockType, R: Clone, T: BitSliceable<R, Block = Block>, U: BitSliceable<R, Block = Block>,

Source§

type Slice = BitAnd<<T as BitSliceable<R>>::Slice, <U as BitSliceable<R>>::Slice>

The type of the slice produced.
Source§

fn bit_slice(self, range: R) -> Self::Slice

Slices or re-slices the given object. Read more
Source§

impl<'a, T: Bits, U: Bits<Block = T::Block>> BitSliceable<Range<u64>> for &'a BitAnd<T, U>

Source§

type Slice = BitSliceAdapter<&'a BitAnd<T, U>>

The type of the slice produced.
Source§

fn bit_slice(self, range: Range<u64>) -> Self::Slice

Slices or re-slices the given object. Read more
Source§

impl<'a, T: Bits, U: Bits<Block = T::Block>> BitSliceable<RangeFrom<u64>> for &'a BitAnd<T, U>

Source§

type Slice = BitSliceAdapter<&'a BitAnd<T, U>>

The type of the slice produced.
Source§

fn bit_slice(self, range: RangeFrom<u64>) -> Self::Slice

Slices or re-slices the given object. Read more
Source§

impl<'a, T: Bits, U: Bits<Block = T::Block>> BitSliceable<RangeFull> for &'a BitAnd<T, U>

Source§

type Slice = BitSliceAdapter<&'a BitAnd<T, U>>

The type of the slice produced.
Source§

fn bit_slice(self, _range: RangeFull) -> Self::Slice

Slices or re-slices the given object. Read more
Source§

impl<'a, T: Bits, U: Bits<Block = T::Block>> BitSliceable<RangeInclusive<u64>> for &'a BitAnd<T, U>

Source§

type Slice = BitSliceAdapter<&'a BitAnd<T, U>>

The type of the slice produced.
Source§

fn bit_slice(self, range: RangeInclusive<u64>) -> Self::Slice

Slices or re-slices the given object. Read more
Source§

impl<'a, T: Bits, U: Bits<Block = T::Block>> BitSliceable<RangeTo<u64>> for &'a BitAnd<T, U>

Source§

type Slice = BitSliceAdapter<&'a BitAnd<T, U>>

The type of the slice produced.
Source§

fn bit_slice(self, range: RangeTo<u64>) -> Self::Slice

Slices or re-slices the given object. Read more
Source§

impl<'a, T: Bits, U: Bits<Block = T::Block>> BitSliceable<RangeToInclusive<u64>> for &'a BitAnd<T, U>

Source§

type Slice = BitSliceAdapter<&'a BitAnd<T, U>>

The type of the slice produced.
Source§

fn bit_slice(self, range: RangeToInclusive<u64>) -> Self::Slice

Slices or re-slices the given object. Read more
Source§

impl<T, U> Bits for BitAnd<T, U>
where T: Bits, U: Bits<Block = T::Block>,

Source§

type Block = <T as Bits>::Block

The underlying block type used to store the bits of the vector.
Source§

fn bit_len(&self) -> u64

The length of the slice in bits.
Source§

fn get_bit(&self, position: u64) -> bool

Gets the bit at position Read more
Source§

fn get_block(&self, position: usize) -> Self::Block

Gets the block at position, masked as necessary. Read more
Source§

fn get_raw_block(&self, position: usize) -> Self::Block

Gets the block at position, without masking. Read more
Source§

fn block_len(&self) -> usize

The length of the slice in blocks.
Source§

fn get_bits(&self, start: u64, count: usize) -> Self::Block

Gets count bits starting at bit index start, interpreted as a little-endian integer. Read more
Source§

fn to_bit_vec(&self) -> BitVec<Self::Block>

Copies the bits into a new allocated BitVec.
Source§

impl<T: Clone, U: Clone> Clone for BitAnd<T, U>

Source§

fn clone(&self) -> BitAnd<T, U>

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<T: Debug, U: Debug> Debug for BitAnd<T, U>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<T: Bits, U: Bits<Block = T::Block>> Index<u64> for BitAnd<T, U>

Source§

type Output = bool

The returned type after indexing.
Source§

fn index(&self, index: u64) -> &bool

Performs the indexing (container[index]) operation. Read more
Source§

impl<T, U, V> PartialEq<V> for BitAnd<T, U>
where T: Bits, U: Bits<Block = T::Block>, V: Bits<Block = T::Block>,

Source§

fn eq(&self, other: &V) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.

Auto Trait Implementations§

§

impl<T, U> Freeze for BitAnd<T, U>
where T: Freeze, U: Freeze,

§

impl<T, U> RefUnwindSafe for BitAnd<T, U>

§

impl<T, U> Send for BitAnd<T, U>
where T: Send, U: Send,

§

impl<T, U> Sync for BitAnd<T, U>
where T: Sync, U: Sync,

§

impl<T, U> Unpin for BitAnd<T, U>
where T: Unpin, U: Unpin,

§

impl<T, U> UnwindSafe for BitAnd<T, U>
where T: UnwindSafe, U: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> BitsExt for T
where T: Bits,

Source§

fn bit_concat<Other>(&self, other: Other) -> BitConcat<&Self, Other>
where Other: Bits<Block = Self::Block>,

Concatenates two bit vectors, with the bits of self followed by the bits of other.
Source§

fn into_bit_concat<Other>(self, other: Other) -> BitConcat<Self, Other>
where Self: Sized, Other: Bits<Block = Self::Block>,

Concatenates two bit vectors, with the bits of self followed by the bits of other. Read more
Source§

fn bit_pad(&self, len: u64) -> BitConcat<&Self, BitFill<Self::Block>>

Pads self with 0s on the right to reach at least len bits in length. Read more
Source§

fn into_bit_pad(self, len: u64) -> BitConcat<Self, BitFill<Self::Block>>
where Self: Sized,

Pads self with 0s on the right to reach at least len bits in length. Read more
Source§

fn bit_not(&self) -> BitNot<&Self>

Returns an object that inverts the values of all the bits in self.
Source§

fn into_bit_not(self) -> BitNot<Self>
where Self: Sized,

Returns an object that inverts the values of all the bits in self. Read more
Source§

fn bit_and<Other>(&self, other: Other) -> BitAnd<&Self, Other>
where Other: Bits<Block = Self::Block>,

Returns an object that lazily computes the bit-wise conjunction of two bit-vector-likes. Read more
Source§

fn into_bit_and<Other>(self, other: Other) -> BitAnd<Self, Other>
where Self: Sized, Other: Bits<Block = Self::Block>,

Returns an object that lazily computes the bit-wise conjunction of two bit-vector-likes. Read more
Source§

fn bit_or<Other>(&self, other: Other) -> BitOr<&Self, Other>
where Other: Bits<Block = Self::Block>,

Returns an object that lazily computes the bit-wise disjunction of two bit-vector-likes. Read more
Source§

fn into_bit_or<Other>(self, other: Other) -> BitOr<Self, Other>
where Self: Sized, Other: Bits<Block = Self::Block>,

Returns an object that lazily computes the bit-wise disjunction of two bit-vector-likes. Read more
Source§

fn bit_xor<Other>(&self, other: Other) -> BitXor<&Self, Other>
where Other: Bits<Block = Self::Block>,

Returns an object that lazily computes the bit-wise xor of two bit-vector-likes. Read more
Source§

fn into_bit_xor<Other>(self, other: Other) -> BitXor<Self, Other>
where Self: Sized, Other: Bits<Block = Self::Block>,

Returns an object that lazily computes the bit-wise xor of two bit-vector-likes. Read more
Source§

fn bit_zip<Other, F>(&self, other: Other, fun: F) -> BitZip<&Self, Other, F>
where Other: Bits<Block = Self::Block>, F: Fn(Self::Block, Self::Block, usize) -> Self::Block,

Returns an object that lazily zips a function over the blocks of two bit-vector-like. Read more
Source§

fn into_bit_zip<Other, F>(self, other: Other, fun: F) -> BitZip<Self, Other, F>
where Self: Sized, Other: Bits<Block = Self::Block>, F: Fn(Self::Block, Self::Block, usize) -> Self::Block,

Returns an object that lazily zips a function over the blocks of two bit-vector-like. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.