Struct dbn::metadata::MetadataBuilder
source · pub struct MetadataBuilder<D, Sch, Start, StIn, StOut> { /* private fields */ }Expand description
Helper for constructing Metadata structs with defaults.
This struct uses type state to ensure at compile time that all the required fields
are set. If a required field is not set, build() won’t be visible.
Required fields
Implementations§
source§impl<D, Sch, Start, StIn, StOut> MetadataBuilder<D, Sch, Start, StIn, StOut>
impl<D, Sch, Start, StIn, StOut> MetadataBuilder<D, Sch, Start, StIn, StOut>
sourcepub fn dataset(
self,
dataset: String
) -> MetadataBuilder<String, Sch, Start, StIn, StOut>
pub fn dataset( self, dataset: String ) -> MetadataBuilder<String, Sch, Start, StIn, StOut>
Sets the dataset and returns the builder.
sourcepub fn schema(
self,
schema: Option<Schema>
) -> MetadataBuilder<D, Option<Schema>, Start, StIn, StOut>
pub fn schema( self, schema: Option<Schema> ) -> MetadataBuilder<D, Option<Schema>, Start, StIn, StOut>
Sets the schema and returns the builder.
sourcepub fn start(self, start: u64) -> MetadataBuilder<D, Sch, u64, StIn, StOut>
pub fn start(self, start: u64) -> MetadataBuilder<D, Sch, u64, StIn, StOut>
Sets the start and returns the builder.
sourcepub fn end(self, end: Option<NonZeroU64>) -> Self
pub fn end(self, end: Option<NonZeroU64>) -> Self
Sets the end and returns the builder.
sourcepub fn limit(self, limit: Option<NonZeroU64>) -> Self
pub fn limit(self, limit: Option<NonZeroU64>) -> Self
Sets the limit and returns the builder.
sourcepub fn stype_in(
self,
stype_in: Option<SType>
) -> MetadataBuilder<D, Sch, Start, Option<SType>, StOut>
pub fn stype_in( self, stype_in: Option<SType> ) -> MetadataBuilder<D, Sch, Start, Option<SType>, StOut>
Sets the stype_in and returns the builder.
sourcepub fn stype_out(
self,
stype_out: SType
) -> MetadataBuilder<D, Sch, Start, StIn, SType>
pub fn stype_out( self, stype_out: SType ) -> MetadataBuilder<D, Sch, Start, StIn, SType>
Sets the stype_out and returns the builder.
sourcepub fn not_found(self, not_found: Vec<String>) -> Self
pub fn not_found(self, not_found: Vec<String>) -> Self
Sets the not_found and returns the builder.
sourcepub fn mappings(self, mappings: Vec<SymbolMapping>) -> Self
pub fn mappings(self, mappings: Vec<SymbolMapping>) -> Self
Sets the mappings and returns the builder.
Trait Implementations§
Auto Trait Implementations§
impl<D, Sch, Start, StIn, StOut> RefUnwindSafe for MetadataBuilder<D, Sch, Start, StIn, StOut>where D: RefUnwindSafe, Sch: RefUnwindSafe, StIn: RefUnwindSafe, StOut: RefUnwindSafe, Start: RefUnwindSafe,
impl<D, Sch, Start, StIn, StOut> Send for MetadataBuilder<D, Sch, Start, StIn, StOut>where D: Send, Sch: Send, StIn: Send, StOut: Send, Start: Send,
impl<D, Sch, Start, StIn, StOut> Sync for MetadataBuilder<D, Sch, Start, StIn, StOut>where D: Sync, Sch: Sync, StIn: Sync, StOut: Sync, Start: Sync,
impl<D, Sch, Start, StIn, StOut> Unpin for MetadataBuilder<D, Sch, Start, StIn, StOut>where D: Unpin, Sch: Unpin, StIn: Unpin, StOut: Unpin, Start: Unpin,
impl<D, Sch, Start, StIn, StOut> UnwindSafe for MetadataBuilder<D, Sch, Start, StIn, StOut>where D: UnwindSafe, Sch: UnwindSafe, StIn: UnwindSafe, StOut: UnwindSafe, Start: UnwindSafe,
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