pub struct RecordField {
pub name: String,
pub doc: Documentation,
pub aliases: Option<Vec<String>>,
pub default: Option<Value>,
pub schema: Schema,
pub order: RecordFieldOrder,
pub position: usize,
pub custom_attributes: BTreeMap<String, Value>,
}Expand description
Represents a field in a record Avro schema.
Fields§
§name: StringName of the field.
doc: DocumentationDocumentation of the field.
aliases: Option<Vec<String>>Aliases of the field’s name. They have no namespace.
default: Option<Value>Default value of the field. This value will be used when reading Avro datum if schema resolution is enabled.
schema: SchemaSchema of the field.
order: RecordFieldOrderOrder of the field.
NOTE This currently has no effect.
position: usizePosition of the field in the list of field of its parent Schema
custom_attributes: BTreeMap<String, Value>A collection of all unknown fields in the record field.
Implementations§
Source§impl RecordField
impl RecordField
Sourcepub fn builder() -> RecordFieldBuilder
pub fn builder() -> RecordFieldBuilder
Create an instance of RecordField using the builder syntax
Source§impl RecordField
impl RecordField
Sourcepub fn is_nullable(&self) -> bool
pub fn is_nullable(&self) -> bool
Returns true if this RecordField is nullable, meaning the schema is a UnionSchema where the first variant is Null.
Trait Implementations§
Source§impl Clone for RecordField
impl Clone for RecordField
Source§fn clone(&self) -> RecordField
fn clone(&self) -> RecordField
Returns a duplicate of the value. Read more
1.0.0 · 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 RecordField
impl Debug for RecordField
Source§impl PartialEq for RecordField
impl PartialEq for RecordField
Source§impl Serialize for RecordField
impl Serialize for RecordField
impl StructuralPartialEq for RecordField
Auto Trait Implementations§
impl Freeze for RecordField
impl RefUnwindSafe for RecordField
impl Send for RecordField
impl Sync for RecordField
impl Unpin for RecordField
impl UnwindSafe for RecordField
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