Skip to main content

RawTableReader

Struct RawTableReader 

Source
pub struct RawTableReader<'a, MA>
where MA: MemoryAccess,
{ /* private fields */ }
Expand description

Iterator over a table’s records as raw bytes. Mirrors the scan logic of TableReader but parameterised over runtime alignment (the migration codec slices records by snapshot, not by T).

Implementations§

Source§

impl<'a, MA> RawTableReader<'a, MA>
where MA: MemoryAccess,

Source

pub fn new( page_ledger: &'a PageLedger, alignment: PageOffset, mm: &'a mut MA, ) -> Self

Build a reader. alignment must be the table’s record alignment as stored in the snapshot (matches the on-disk layout written by TableRegistry::insert).

Source

pub fn try_next(&mut self) -> MemoryResult<Option<RawRecordBytes>>

Pop the next live record’s bytes, or Ok(None) at end of table.

Auto Trait Implementations§

§

impl<'a, MA> Freeze for RawTableReader<'a, MA>

§

impl<'a, MA> RefUnwindSafe for RawTableReader<'a, MA>
where MA: RefUnwindSafe,

§

impl<'a, MA> Send for RawTableReader<'a, MA>
where MA: Send,

§

impl<'a, MA> Sync for RawTableReader<'a, MA>
where MA: Sync,

§

impl<'a, MA> Unpin for RawTableReader<'a, MA>

§

impl<'a, MA> UnsafeUnpin for RawTableReader<'a, MA>

§

impl<'a, MA> !UnwindSafe for RawTableReader<'a, MA>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.