pub struct SchemaBuilder { /* private fields */ }Expand description
Builder for constructing Schema instances.
Implementations§
Source§impl SchemaBuilder
impl SchemaBuilder
Sourcepub fn with_field(
self,
id: i32,
name: impl Into<String>,
field_type: Type,
required: bool,
) -> Self
pub fn with_field( self, id: i32, name: impl Into<String>, field_type: Type, required: bool, ) -> Self
Adds a simple field to the schema.
Sourcepub fn with_field_full(self, field: Field) -> Self
pub fn with_field_full(self, field: Field) -> Self
Adds a fully-specified field to the schema.
Sourcepub fn with_identifier_fields(
self,
field_ids: impl IntoIterator<Item = i32>,
) -> Self
pub fn with_identifier_fields( self, field_ids: impl IntoIterator<Item = i32>, ) -> Self
Marks fields as identifier (primary key) fields.
Auto Trait Implementations§
impl Freeze for SchemaBuilder
impl RefUnwindSafe for SchemaBuilder
impl Send for SchemaBuilder
impl Sync for SchemaBuilder
impl Unpin for SchemaBuilder
impl UnwindSafe for SchemaBuilder
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
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