Skip to main content

ScanRequest

Struct ScanRequest 

Source
pub struct ScanRequest<'a> {
    pub row_start: u64,
    pub row_count: u64,
    pub flags: u64,
    pub projection: Projection<'a>,
    pub filter: &'a [u8],
}
Expand description

The host asking the decoder for a run of rows.

Fields§

§row_start: u64

The first row wanted, counting from zero.

This is 64 bits because a row count that fits in 32 bits is a limit somebody will hit, and the whole point of the exercise is not to build limits into a format that ossifies.

§row_count: u64

How many rows are wanted. u64::MAX means “everything from row_start on”.

§flags: u64

Flags, all currently reserved and required to be zero.

§projection: Projection<'a>

Which columns are wanted.

§filter: &'a [u8]

A filter for the decoder to apply, in a form the decoder and the host have agreed on separately. Empty means no filter.

Implementations§

Source§

impl<'a> ScanRequest<'a>

Source

pub const VERSION: u16 = 1

The layout version of this record.

Source

pub const fn everything() -> Self

A request for every row and every column.

Source

pub fn encode(&self, w: &mut Writer<'_>) -> Result<()>

Writes the record.

§Errors

Returns Error::BufferFull if the buffer runs out.

Source

pub fn decode(version: u16, p: &mut Reader<'a>) -> Result<Self>

Reads the record from its payload.

§Errors

Returns Error::UnsupportedVersion if the layout version is not one this build knows, Error::Truncated if the payload ends early, or Error::Malformed if the projection is not a whole number of column indices.

Trait Implementations§

Source§

impl<'a> Clone for ScanRequest<'a>

Source§

fn clone(&self) -> ScanRequest<'a>

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<'a> Copy for ScanRequest<'a>

Source§

impl<'a> Debug for ScanRequest<'a>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'a> Eq for ScanRequest<'a>

Source§

impl<'a> PartialEq for ScanRequest<'a>

Source§

fn eq(&self, other: &ScanRequest<'a>) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl<'a> StructuralPartialEq for ScanRequest<'a>

Auto Trait Implementations§

§

impl<'a> Freeze for ScanRequest<'a>

§

impl<'a> RefUnwindSafe for ScanRequest<'a>

§

impl<'a> Send for ScanRequest<'a>

§

impl<'a> Sync for ScanRequest<'a>

§

impl<'a> Unpin for ScanRequest<'a>

§

impl<'a> UnsafeUnpin for ScanRequest<'a>

§

impl<'a> UnwindSafe for ScanRequest<'a>

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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 = !

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

fn try_from(value: U) -> Result<T, !>

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.