pub struct Projection<'a> { /* private fields */ }Expand description
The columns a scan is being asked for.
This is a list of indices and not a bitmask. A bitmask has to pick a width, and whatever width it picks becomes the maximum number of columns the format can ever describe. Wide tables are exactly where a columnar format is supposed to win, so putting a ceiling on the column count is the wrong place to save four bytes.
Implementations§
Source§impl<'a> Projection<'a>
impl<'a> Projection<'a>
Sourcepub fn from_bytes(raw: &'a [u8]) -> Result<Self>
pub fn from_bytes(raw: &'a [u8]) -> Result<Self>
Wraps the encoded form.
§Errors
Returns Error::Malformed if the length is not a whole number of column indices.
Sourcepub const fn is_empty(self) -> bool
pub const fn is_empty(self) -> bool
Whether the projection names no columns, which means every column.
Trait Implementations§
Source§impl<'a> Clone for Projection<'a>
impl<'a> Clone for Projection<'a>
Source§fn clone(&self) -> Projection<'a>
fn clone(&self) -> Projection<'a>
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 moreimpl<'a> Copy for Projection<'a>
Source§impl<'a> Debug for Projection<'a>
impl<'a> Debug for Projection<'a>
impl<'a> Eq for Projection<'a>
Source§impl<'a> PartialEq for Projection<'a>
impl<'a> PartialEq for Projection<'a>
impl<'a> StructuralPartialEq for Projection<'a>
Auto Trait Implementations§
impl<'a> Freeze for Projection<'a>
impl<'a> RefUnwindSafe for Projection<'a>
impl<'a> Send for Projection<'a>
impl<'a> Sync for Projection<'a>
impl<'a> Unpin for Projection<'a>
impl<'a> UnsafeUnpin for Projection<'a>
impl<'a> UnwindSafe for Projection<'a>
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