pub struct Projection { /* private fields */ }Expand description
The columns a projected scan returns: intrinsic columns and value fields, in the order the scan yields them, and the projector that reads the fields out of row values.
Implementations§
Source§impl Projection
impl Projection
Sourcepub fn column(self, column_id: u16) -> Self
pub fn column(self, column_id: u16) -> Self
Adds a column projected by id alone (see ProjectedField::by_id).
Sourcepub fn field(self, field: ProjectedField) -> Self
pub fn field(self, field: ProjectedField) -> Self
Adds a declared field.
Sourcepub fn projector(self, projector: Arc<dyn ValueProjector>) -> Self
pub fn projector(self, projector: Arc<dyn ValueProjector>) -> Self
Sets the projector that reads the fields out of row values.
Sourcepub fn fields(&self) -> &[ProjectedField]
pub fn fields(&self) -> &[ProjectedField]
The projected fields, in output order.
Sourcepub fn value_projector(&self) -> Option<&Arc<dyn ValueProjector>>
pub fn value_projector(&self) -> Option<&Arc<dyn ValueProjector>>
The projector, when one is set.
Trait Implementations§
Source§impl Clone for Projection
impl Clone for Projection
Source§impl Debug for Projection
impl Debug for Projection
Source§impl Default for Projection
impl Default for Projection
Source§impl From<&Projection> for Projection
impl From<&Projection> for Projection
Auto Trait Implementations§
impl !RefUnwindSafe for Projection
impl !UnwindSafe for Projection
impl Freeze for Projection
impl Send for Projection
impl Sync for Projection
impl Unpin for Projection
impl UnsafeUnpin for Projection
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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