Struct narrow::array::BooleanArray

source ·
pub struct BooleanArray<const NULLABLE: bool = false, Buffer: BufferType = VecBuffer>(_)
where
    Bitmap<Buffer>: Validity<NULLABLE>;
Expand description

Array with boolean values.

Values are stored using single bits in a Bitmap.

Trait Implementations§

source§

impl<Buffer: BufferType> BitmapRef for BooleanArray<true, Buffer>

§

type Buffer = Buffer

The buffer type of the bitmap.
source§

fn bitmap_ref(&self) -> &Bitmap<Self::Buffer>

Returns a reference to an immutable Bitmap.
source§

impl<Buffer: BufferType> BitmapRefMut for BooleanArray<true, Buffer>

source§

fn bitmap_ref_mut(&mut self) -> &mut Bitmap<Self::Buffer>

Returns a mutable reference to a Bitmap.
source§

impl<const NULLABLE: bool, Buffer: BufferType> Default for BooleanArray<NULLABLE, Buffer>where Bitmap<Buffer>: Validity<NULLABLE>, <Bitmap<Buffer> as Validity<NULLABLE>>::Storage<Buffer>: Default,

source§

fn default() -> Self

Returns the “default value” for a type. Read more
source§

impl<U, const NULLABLE: bool, Buffer: BufferType> Extend<U> for BooleanArray<NULLABLE, Buffer>where Bitmap<Buffer>: Validity<NULLABLE>, <Bitmap<Buffer> as Validity<NULLABLE>>::Storage<Buffer>: Extend<U>,

source§

fn extend<I: IntoIterator<Item = U>>(&mut self, iter: I)

Extends a collection with the contents of an iterator. Read more
source§

fn extend_one(&mut self, item: A)

🔬This is a nightly-only experimental API. (extend_one)
Extends a collection with exactly one element.
source§

fn extend_reserve(&mut self, additional: usize)

🔬This is a nightly-only experimental API. (extend_one)
Reserves capacity in a collection for the given number of additional elements. Read more
source§

impl<const NULLABLE: bool, U, Buffer: BufferType> FromIterator<U> for BooleanArray<NULLABLE, Buffer>where Bitmap<Buffer>: Validity<NULLABLE>, <Bitmap<Buffer> as Validity<NULLABLE>>::Storage<Buffer>: FromIterator<U>,

source§

fn from_iter<I: IntoIterator<Item = U>>(iter: I) -> Self

Creates a value from an iterator. Read more
source§

impl<'a, const NULLABLE: bool, Buffer: BufferType> IntoIterator for &'a BooleanArray<NULLABLE, Buffer>where Bitmap<Buffer>: Validity<NULLABLE>, &'a <Bitmap<Buffer> as Validity<NULLABLE>>::Storage<Buffer>: IntoIterator,

§

type Item = <&'a <Bitmap<Buffer> as Validity<NULLABLE>>::Storage<Buffer> as IntoIterator>::Item

The type of the elements being iterated over.
§

type IntoIter = <&'a <Bitmap<Buffer> as Validity<NULLABLE>>::Storage<Buffer> as IntoIterator>::IntoIter

Which kind of iterator are we turning this into?
source§

fn into_iter(self) -> Self::IntoIter

Creates an iterator from a value. Read more
source§

impl<const NULLABLE: bool, Buffer: BufferType> IntoIterator for BooleanArray<NULLABLE, Buffer>where Bitmap<Buffer>: Validity<NULLABLE>, <Bitmap<Buffer> as Validity<NULLABLE>>::Storage<Buffer>: IntoIterator,

§

type Item = <<Bitmap<Buffer> as Validity<NULLABLE>>::Storage<Buffer> as IntoIterator>::Item

The type of the elements being iterated over.
§

type IntoIter = <<Bitmap<Buffer> as Validity<NULLABLE>>::Storage<Buffer> as IntoIterator>::IntoIter

Which kind of iterator are we turning this into?
source§

fn into_iter(self) -> Self::IntoIter

Creates an iterator from a value. Read more
source§

impl<const NULLABLE: bool, Buffer: BufferType> Length for BooleanArray<NULLABLE, Buffer>where Bitmap<Buffer>: Validity<NULLABLE>, <Bitmap<Buffer> as Validity<NULLABLE>>::Storage<Buffer>: Length,

source§

fn len(&self) -> usize

Returns the number of elements in the collection, also referred to as its length.
source§

fn is_empty(&self) -> bool

Returns true if there are no elements in the collection.
source§

impl<Buffer: BufferType> ValidityBitmap for BooleanArray<true, Buffer>

source§

fn is_null(&self, index: usize) -> Option<bool>

Returns true if the element at position index is null.
source§

unsafe fn is_null_unchecked(&self, index: usize) -> bool

Returns true if the element at position index is null, without performing any bounds checking. Read more
source§

fn null_count(&self) -> usize

Returns the number of null elements.
source§

fn is_valid(&self, index: usize) -> Option<bool>

Returns true if the element at position index is valid.
source§

unsafe fn is_valid_unchecked(&self, index: usize) -> bool

Returns true if the element at position index is valid, without performing any bounds checking. Read more
source§

fn valid_count(&self) -> usize

Returns the number of valid elements.
source§

fn any_null(&self) -> bool

Returns true if the array contains at least one null element.
source§

fn all_null(&self) -> bool

Returns true if all the elements are null.
source§

fn any_valid(&self) -> bool

Returns true if the array contains at least one valid element.
source§

fn all_valid(&self) -> bool

Returns true if all the elements are valid.
source§

impl<const NULLABLE: bool, Buffer: BufferType> Array for BooleanArray<NULLABLE, Buffer>where Bitmap<Buffer>: Validity<NULLABLE>,

Auto Trait Implementations§

§

impl<const NULLABLE: bool = false, Buffer = VecBuffer> !RefUnwindSafe for BooleanArray<NULLABLE, Buffer>

§

impl<const NULLABLE: bool = false, Buffer = VecBuffer> !Send for BooleanArray<NULLABLE, Buffer>

§

impl<const NULLABLE: bool = false, Buffer = VecBuffer> !Sync for BooleanArray<NULLABLE, Buffer>

§

impl<const NULLABLE: bool = false, Buffer = VecBuffer> !Unpin for BooleanArray<NULLABLE, Buffer>

§

impl<const NULLABLE: bool = false, Buffer = VecBuffer> !UnwindSafe for BooleanArray<NULLABLE, Buffer>

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

source§

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

Mutably borrows from an owned value. 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 Twhere 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, U> TryFrom<U> for Twhere U: Into<T>,

§

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 Twhere U: TryFrom<T>,

§

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.