pub struct MetadataSchemaBuilder { /* private fields */ }Expand description
Builder for MetadataSchema.
Implementations§
Source§impl MetadataSchemaBuilder
impl MetadataSchemaBuilder
Sourcepub fn required(self, key: &str, data_type: DataType) -> Self
pub fn required(self, key: &str, data_type: DataType) -> Self
Adds a required field definition.
Sourcepub fn optional(self, key: &str, data_type: DataType) -> Self
pub fn optional(self, key: &str, data_type: DataType) -> Self
Adds an optional field definition.
Sourcepub fn unknown_field_policy(self, policy: UnknownFieldPolicy) -> Self
pub fn unknown_field_policy(self, policy: UnknownFieldPolicy) -> Self
Sets the policy for metadata keys not declared by the schema.
Sourcepub fn build(self) -> MetadataSchema
pub fn build(self) -> MetadataSchema
Builds the schema.
Trait Implementations§
Source§impl Clone for MetadataSchemaBuilder
impl Clone for MetadataSchemaBuilder
Source§fn clone(&self) -> MetadataSchemaBuilder
fn clone(&self) -> MetadataSchemaBuilder
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 moreSource§impl Debug for MetadataSchemaBuilder
impl Debug for MetadataSchemaBuilder
Source§impl Default for MetadataSchemaBuilder
impl Default for MetadataSchemaBuilder
Source§fn default() -> MetadataSchemaBuilder
fn default() -> MetadataSchemaBuilder
Returns the “default value” for a type. Read more
Source§impl PartialEq for MetadataSchemaBuilder
impl PartialEq for MetadataSchemaBuilder
Source§fn eq(&self, other: &MetadataSchemaBuilder) -> bool
fn eq(&self, other: &MetadataSchemaBuilder) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for MetadataSchemaBuilder
impl StructuralPartialEq for MetadataSchemaBuilder
Auto Trait Implementations§
impl Freeze for MetadataSchemaBuilder
impl RefUnwindSafe for MetadataSchemaBuilder
impl Send for MetadataSchemaBuilder
impl Sync for MetadataSchemaBuilder
impl Unpin for MetadataSchemaBuilder
impl UnsafeUnpin for MetadataSchemaBuilder
impl UnwindSafe for MetadataSchemaBuilder
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoValueDefault<T> for T
impl<T> IntoValueDefault<T> for T
Source§fn into_value_default(self) -> T
fn into_value_default(self) -> T
Converts this argument into the default value.