pub enum Data {
Bool(Buf<u8>),
I64(Buf<i64>),
Ext(Buf<Ext>),
Rat(Buf<Rat>),
F64(Buf<f64>),
Complex(Buf<Cx>),
Char(Buf<char>),
Box(Buf<Array>),
}Variants§
Bool(Buf<u8>)
I64(Buf<i64>)
Ext(Buf<Ext>)
Arbitrary-precision integers. Like boxes, these are heap-backed pointers rather than machine words: never foreign, never fused, never vectorised.
Rat(Buf<Rat>)
Exact ratios, each in lowest terms. Heap-backed, as Ext is.
F64(Buf<f64>)
Complex(Buf<Cx>)
Complex numbers, interleaved [re, im] — the layout numpy, C and a
pair of Arrow float columns all share.
Char(Buf<char>)
Box(Buf<Array>)
Boxes: every element is a whole array. Foreign memory never holds these, so a boxed buffer is always owned and cloning it is a refcount bump like any other.
Implementations§
Source§impl Data
impl Data
pub fn dtype(&self) -> DType
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
Sourcepub fn is_foreign(&self) -> bool
pub fn is_foreign(&self) -> bool
True while the payload still borrows foreign memory.
Sourcepub fn owner(&self) -> Option<&Owner>
pub fn owner(&self) -> Option<&Owner>
The handle keeping this payload’s memory alive, for a borrowed one.
See Buf::owner.
pub fn slice(&self, start: usize, end: usize) -> Data
pub fn empty(dtype: DType) -> Data
Sourcepub fn push_fill(&mut self)
pub fn push_fill(&mut self)
The fill element used by overtaking and framing. The boxed fill is
J’s a:, a box holding an empty numeric list.
pub fn extend_from(&mut self, other: &Data) -> bool
Sourcepub fn interleave(columns: &[Data], rows: usize) -> Option<Data>
pub fn interleave(columns: &[Data], rows: usize) -> Option<Data>
Weave column-major buffers into one row-major block of shape
[rows, columns.len()].
This is the table boundary: a DataFrame arrives as one buffer per column and libjay works rows-leading, so the elements have to be woven once. The weave reads every column in order and writes its result straight through, split across threads at the sizes that pay.
None when the columns disagree on element type, when one is shorter
than rows, or when there are no columns at all — the importing
side has already reported that.
Trait Implementations§
impl StructuralPartialEq for Data
Auto Trait Implementations§
impl !RefUnwindSafe for Data
impl !UnwindSafe for Data
impl Freeze for Data
impl Send for Data
impl Sync for Data
impl Unpin for Data
impl UnsafeUnpin for Data
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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