Struct polars_arrow::array::NullArray
source · pub struct NullArray { /* private fields */ }
Expand description
The concrete Array
of ArrowDataType::Null
.
Implementations§
source§impl NullArray
impl NullArray
sourcepub fn try_new(data_type: ArrowDataType, length: usize) -> PolarsResult<Self>
pub fn try_new(data_type: ArrowDataType, length: usize) -> PolarsResult<Self>
Returns a new NullArray
.
§Errors
This function errors iff:
- The
data_type
’scrate::datatypes::PhysicalType
is not equal tocrate::datatypes::PhysicalType::Null
.
sourcepub fn new(data_type: ArrowDataType, length: usize) -> Self
pub fn new(data_type: ArrowDataType, length: usize) -> Self
Returns a new NullArray
.
§Panics
This function errors iff:
- The
data_type
’scrate::datatypes::PhysicalType
is not equal tocrate::datatypes::PhysicalType::Null
.
sourcepub fn new_empty(data_type: ArrowDataType) -> Self
pub fn new_empty(data_type: ArrowDataType) -> Self
Returns a new empty NullArray
.
sourcepub fn new_null(data_type: ArrowDataType, length: usize) -> Self
pub fn new_null(data_type: ArrowDataType, length: usize) -> Self
Returns a new NullArray
.
sourcepub unsafe fn sliced_unchecked(self, offset: usize, length: usize) -> Self
pub unsafe fn sliced_unchecked(self, offset: usize, length: usize) -> Self
sourcepub fn boxed(self) -> Box<dyn Array>
pub fn boxed(self) -> Box<dyn Array>
Boxes this array into a Box<dyn Array>
.
sourcepub fn arced(self) -> Arc<dyn Array>
pub fn arced(self) -> Arc<dyn Array>
Arcs this array into a std::sync::Arc<dyn Array>
.
Trait Implementations§
source§impl Array for NullArray
impl Array for NullArray
source§fn as_any(&self) -> &dyn Any
fn as_any(&self) -> &dyn Any
Converts itself to a reference of
Any
, which enables downcasting to concrete types.source§fn as_any_mut(&mut self) -> &mut dyn Any
fn as_any_mut(&mut self) -> &mut dyn Any
Converts itself to a mutable reference of
Any
, which enables mutable downcasting to concrete types.source§fn len(&self) -> usize
fn len(&self) -> usize
The length of the
Array
. Every array has a length corresponding to the number of
elements (slots).source§fn data_type(&self) -> &ArrowDataType
fn data_type(&self) -> &ArrowDataType
The
ArrowDataType
of the Array
. In combination with Array::as_any
, this can be
used to downcast trait objects (dyn Array
) to concrete arrays.source§unsafe fn slice_unchecked(&mut self, offset: usize, length: usize)
unsafe fn slice_unchecked(&mut self, offset: usize, length: usize)
source§unsafe fn is_null_unchecked(&self, i: usize) -> bool
unsafe fn is_null_unchecked(&self, i: usize) -> bool
Returns whether slot
i
is null. Read moresource§impl From<GrowableNull> for NullArray
impl From<GrowableNull> for NullArray
source§fn from(val: GrowableNull) -> Self
fn from(val: GrowableNull) -> Self
Converts to this type from the input type.
source§impl From<MutableNullArray> for NullArray
impl From<MutableNullArray> for NullArray
source§fn from(value: MutableNullArray) -> Self
fn from(value: MutableNullArray) -> Self
Converts to this type from the input type.
source§impl PartialEq<&(dyn Array + 'static)> for NullArray
impl PartialEq<&(dyn Array + 'static)> for NullArray
Auto Trait Implementations§
impl Freeze for NullArray
impl RefUnwindSafe for NullArray
impl Send for NullArray
impl Sync for NullArray
impl Unpin for NullArray
impl UnwindSafe for NullArray
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