pub struct DictArray { /* private fields */ }Implementations§
Source§impl DictArray
impl DictArray
Sourcepub unsafe fn new_unchecked(codes: ArrayRef, values: ArrayRef) -> Self
pub unsafe fn new_unchecked(codes: ArrayRef, values: ArrayRef) -> Self
Build a new DictArray without validating the codes or values.
§Safety
This should be called only when you can guarantee the invariants checked
by the safe DictArray::try_new constructor are valid, for example when
you are filtering or slicing an existing valid DictArray.
Sourcepub fn new(codes: ArrayRef, values: ArrayRef) -> Self
pub fn new(codes: ArrayRef, values: ArrayRef) -> Self
Build a new DictArray from its components, codes and values.
This constructor will panic if codes or values do not pass validation for building
a new DictArray. See DictArray::try_new for a description of the error conditions.
Sourcepub fn try_new(codes: ArrayRef, values: ArrayRef) -> VortexResult<Self>
pub fn try_new(codes: ArrayRef, values: ArrayRef) -> VortexResult<Self>
Build a new DictArray from its components, codes and values.
The codes must be unsigned integers, and may be nullable. Values can be any type, and
may also be nullable. This mirrors the nullability of the Arrow DictionaryArray.
§Errors
The codes must be unsigned integers, and the maximum code must be less than the length
of the values array. Otherwise, this constructor returns an error.
It is an error to provide a nullable codes with non-nullable values.
pub fn codes(&self) -> &ArrayRef
pub fn values(&self) -> &ArrayRef
Trait Implementations§
Auto Trait Implementations§
impl Freeze for DictArray
impl !RefUnwindSafe for DictArray
impl Send for DictArray
impl Sync for DictArray
impl Unpin for DictArray
impl !UnwindSafe for DictArray
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more