pub struct SliceBinTableHDU { /* private fields */ }Expand description
A binary table HDU backed by a buffer rather than a file.
Implementations§
Trait Implementations§
Source§impl BinTableHDU for SliceBinTableHDU
impl BinTableHDU for SliceBinTableHDU
Source§fn table_data_bytes_len(&self) -> u64
fn table_data_bytes_len(&self) -> u64
How many bytes the rows occupy, not counting the heap.
Source§fn read_table(&self) -> Result<BinTable, Box<dyn Error + Send + Sync>>
fn read_table(&self) -> Result<BinTable, Box<dyn Error + Send + Sync>>
Reads the whole table into memory.
Source§fn set_table(
&mut self,
table: &BinTable,
) -> Result<(), Box<dyn Error + Send + Sync>>
fn set_table( &mut self, table: &BinTable, ) -> Result<(), Box<dyn Error + Send + Sync>>
Replaces this HDU’s table. Read more
Source§fn read_rows<T: DeserializeOwned + Send + Sync>(
&self,
) -> Result<Vec<T>, Box<dyn Error + Send + Sync>>
fn read_rows<T: DeserializeOwned + Send + Sync>( &self, ) -> Result<Vec<T>, Box<dyn Error + Send + Sync>>
Available on crate feature
serde only.Reads every row into
T, matching columns to fields by their TTYPEn names.Source§fn stream_table_rows_raw(
&self,
) -> Result<BoxStream<'_, OwnedRow>, Box<dyn Error + Send + Sync>>
fn stream_table_rows_raw( &self, ) -> Result<BoxStream<'_, OwnedRow>, Box<dyn Error + Send + Sync>>
Available on crate feature
tokio only.Streams the table one row at a time, without holding the whole thing in
memory. Read more
Source§fn stream_table_rows<T: DeserializeOwned + Send + Sync>(
&self,
) -> Result<BoxStream<'_, Result<T>>, Box<dyn Error + Send + Sync>>
fn stream_table_rows<T: DeserializeOwned + Send + Sync>( &self, ) -> Result<BoxStream<'_, Result<T>>, Box<dyn Error + Send + Sync>>
Available on crate features
serde and tokio only.Streams the table as deserialised rows of
T. Read moreSource§fn is_compressed_image(&self) -> bool
fn is_compressed_image(&self) -> bool
Whether this table holds a compressed image rather than a table of its
own. Read more
Source§impl Clone for SliceBinTableHDU
impl Clone for SliceBinTableHDU
Source§fn clone(&self) -> SliceBinTableHDU
fn clone(&self) -> SliceBinTableHDU
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SliceBinTableHDU
impl Debug for SliceBinTableHDU
Auto Trait Implementations§
impl Freeze for SliceBinTableHDU
impl RefUnwindSafe for SliceBinTableHDU
impl Send for SliceBinTableHDU
impl Sync for SliceBinTableHDU
impl Unpin for SliceBinTableHDU
impl UnsafeUnpin for SliceBinTableHDU
impl UnwindSafe for SliceBinTableHDU
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> 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> ⓘ
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