pub struct ArrowTensorStore { /* private fields */ }Expand description
Collection of tensors stored in Arrow format
Implementations§
Source§impl ArrowTensorStore
impl ArrowTensorStore
Sourcepub fn insert(&mut self, tensor: ArrowTensor)
pub fn insert(&mut self, tensor: ArrowTensor)
Add a tensor to the store
Sourcepub fn get(&self, name: &str) -> Option<&ArrowTensor>
pub fn get(&self, name: &str) -> Option<&ArrowTensor>
Get a tensor by name
Sourcepub fn build_schema(&mut self) -> Arc<Schema>
pub fn build_schema(&mut self) -> Arc<Schema>
Build Arrow schema for all tensors
Sourcepub fn to_record_batch(&mut self) -> Result<RecordBatch, ArrowError>
pub fn to_record_batch(&mut self) -> Result<RecordBatch, ArrowError>
Convert to RecordBatch for IPC
Sourcepub fn write_ipc<W: Write>(&mut self, writer: W) -> Result<(), ArrowError>
pub fn write_ipc<W: Write>(&mut self, writer: W) -> Result<(), ArrowError>
Write to Arrow IPC format
Sourcepub fn read_ipc<R: Read + Seek>(reader: R) -> Result<Self, ArrowError>
pub fn read_ipc<R: Read + Seek>(reader: R) -> Result<Self, ArrowError>
Read from Arrow IPC format
Sourcepub fn to_bytes(&mut self) -> Result<Bytes, ArrowError>
pub fn to_bytes(&mut self) -> Result<Bytes, ArrowError>
Serialize to bytes (Arrow IPC format)
Sourcepub fn from_bytes(bytes: &[u8]) -> Result<Self, ArrowError>
pub fn from_bytes(bytes: &[u8]) -> Result<Self, ArrowError>
Deserialize from bytes
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ArrowTensorStore
impl !RefUnwindSafe for ArrowTensorStore
impl Send for ArrowTensorStore
impl Sync for ArrowTensorStore
impl Unpin for ArrowTensorStore
impl !UnwindSafe for ArrowTensorStore
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
Converts
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>
Converts
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