pub struct SchemaElement {Show 20 fields
pub id: String,
pub name: String,
pub documentation: Option<String>,
pub data_type: Option<String>,
pub min_occurs: Option<String>,
pub max_occurs: Option<String>,
pub min_length: Option<String>,
pub max_length: Option<String>,
pub min_exclusive: Option<String>,
pub max_exclusive: Option<String>,
pub min_inclusive: Option<String>,
pub max_inclusive: Option<String>,
pub pattern: Option<String>,
pub fraction_digits: Option<String>,
pub total_digits: Option<String>,
pub values: Option<Vec<String>>,
pub is_currency: bool,
pub xpath: String,
pub nullable: Option<bool>,
pub elements: Vec<SchemaElement>,
}Fields§
§id: String§name: String§documentation: Option<String>§data_type: Option<String>§min_occurs: Option<String>§max_occurs: Option<String>§min_length: Option<String>§max_length: Option<String>§min_exclusive: Option<String>§max_exclusive: Option<String>§min_inclusive: Option<String>§max_inclusive: Option<String>§pattern: Option<String>§fraction_digits: Option<String>§total_digits: Option<String>§values: Option<Vec<String>>§is_currency: bool§xpath: String§nullable: Option<bool>§elements: Vec<SchemaElement>Implementations§
Source§impl SchemaElement
impl SchemaElement
pub fn to_metadata(&self) -> HashMap<String, String>
pub fn to_arrow(&self) -> Result<DataType, Box<dyn Error>>
pub fn to_spark(&self) -> Result<SparkField, Box<dyn Error>>
pub fn to_avro_field(&self) -> AvroField
pub fn to_avro_type(&self) -> AvroType
pub fn to_avro_fields(&self) -> Vec<AvroField>
Trait Implementations§
Source§impl Clone for SchemaElement
impl Clone for SchemaElement
Source§fn clone(&self) -> SchemaElement
fn clone(&self) -> SchemaElement
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 SchemaElement
impl Debug for SchemaElement
Source§impl<'de> Deserialize<'de> for SchemaElement
impl<'de> Deserialize<'de> for SchemaElement
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for SchemaElement
impl RefUnwindSafe for SchemaElement
impl Send for SchemaElement
impl Sync for SchemaElement
impl Unpin for SchemaElement
impl UnwindSafe for SchemaElement
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> 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