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 MetadataBuilder<Unset, Unset, Unset, Unset, Unset>

source

pub fn new() -> Self

Creates a new instance of the builder.

source§

impl<D, Sch, Start, StIn, StOut> MetadataBuilder<D, Sch, Start, StIn, StOut>

source

pub fn dataset( self, dataset: String ) -> MetadataBuilder<String, Sch, Start, StIn, StOut>

Sets the dataset and returns the builder.

source

pub fn schema( self, schema: Schema ) -> MetadataBuilder<D, Schema, Start, StIn, StOut>

Sets the schema and returns the builder.

source

pub fn start(self, start: u64) -> MetadataBuilder<D, Sch, u64, StIn, StOut>

Sets the start and returns the builder.

source

pub fn end(self, end: Option<NonZeroU64>) -> Self

Sets the end and returns the builder.

source

pub fn limit(self, limit: Option<NonZeroU64>) -> Self

Sets the limit and returns the builder.

source

pub fn stype_in( self, stype_in: SType ) -> MetadataBuilder<D, Sch, Start, SType, StOut>

Sets the stype_in and returns the builder.

source

pub fn stype_out( self, stype_out: SType ) -> MetadataBuilder<D, Sch, Start, StIn, SType>

Sets the stype_out and returns the builder.

source

pub fn ts_out(self, ts_out: bool) -> Self

Sets the ts_out and returns the builder.

source

pub fn symbols(self, symbols: Vec<String>) -> Self

Sets the symbols and returns the builder.

source

pub fn partial(self, partial: Vec<String>) -> Self

Sets the partial and returns the builder.

source

pub fn not_found(self, not_found: Vec<String>) -> Self

Sets the not_found and returns the builder.

source

pub fn mappings(self, mappings: Vec<SymbolMapping>) -> Self

Sets the mappings and returns the builder.

source§

impl MetadataBuilder<String, Schema, u64, SType, SType>

source

pub fn build(self) -> Metadata

Constructs a Metadata object. The availability of this method indicates all required fields have been set.

Trait Implementations§

source§

impl<D: Debug, Sch: Debug, Start: Debug, StIn: Debug, StOut: Debug> Debug for MetadataBuilder<D, Sch, Start, StIn, StOut>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for MetadataBuilder<Unset, Unset, Unset, Unset, Unset>

source§

fn default() -> Self

Returns the “default value” for a type. Read more

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> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

const: unstable · source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
const: unstable · source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.