pub struct RecordSchema<T> { /* private fields */ }Expand description
Fluent metadata descriptor for a Record.
This is the pure-Rust surface that #[derive(Record)] delegates to. The
same record can be described by hand without the macro by implementing
Record::record_schema with this builder; only the type-directed
scan/bind methods then need to be provided.
Implementations§
Source§impl<T> RecordSchema<T>
impl<T> RecordSchema<T>
Sourcepub fn schema(self, schema: impl Into<Option<&'static str>>) -> Self
pub fn schema(self, schema: impl Into<Option<&'static str>>) -> Self
Sets the optional table schema.
Sourcepub fn root(self, root: impl Into<Option<&'static str>>) -> Self
pub fn root(self, root: impl Into<Option<&'static str>>) -> Self
Sets the logical root alias used when scanning from a joined query.
Sourcepub fn reference(self, reference: ReferenceMeta) -> Self
pub fn reference(self, reference: ReferenceMeta) -> Self
Appends a single joined reference.
Sourcepub fn references(self, references: Vec<ReferenceMeta>) -> Self
pub fn references(self, references: Vec<ReferenceMeta>) -> Self
Replaces the joined references.
Sourcepub fn bind_column(self, name: impl Into<String>) -> Self
pub fn bind_column(self, name: impl Into<String>) -> Self
Appends a single bind column name.
Sourcepub fn bind_columns(self, columns: Vec<String>) -> Self
pub fn bind_columns(self, columns: Vec<String>) -> Self
Replaces the bind column names.
Trait Implementations§
Source§impl<T: Clone> Clone for RecordSchema<T>
impl<T: Clone> Clone for RecordSchema<T>
Source§fn clone(&self) -> RecordSchema<T>
fn clone(&self) -> RecordSchema<T>
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 moreAuto Trait Implementations§
impl<T> Freeze for RecordSchema<T>
impl<T> RefUnwindSafe for RecordSchema<T>
impl<T> Send for RecordSchema<T>
impl<T> Sync for RecordSchema<T>
impl<T> Unpin for RecordSchema<T>
impl<T> UnsafeUnpin for RecordSchema<T>
impl<T> UnwindSafe for RecordSchema<T>
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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