Maker

Struct Maker 

Source
struct Maker<'a> {
    resolver: Resolver<'a>,
    use_utf8view: bool,
    strict_mode: bool,
}
Expand description

Fields§

§resolver: Resolver<'a>§use_utf8view: bool§strict_mode: bool

Implementations§

Source§

impl<'a> Maker<'a>

Source

fn new(use_utf8view: bool, strict_mode: bool) -> Self

Source

fn make_data_type<'s>( &mut self, writer_schema: &'s Schema<'a>, reader_schema: Option<&'s Schema<'a>>, namespace: Option<&'a str>, ) -> Result<AvroDataType, ArrowError>

Source

fn parse_type<'s>( &mut self, schema: &'s Schema<'a>, namespace: Option<&'a str>, ) -> Result<AvroDataType, ArrowError>

Parses a AvroDataType from the provided Schema and the given name and namespace

name: is the name used to refer to schema in its parent namespace: an optional qualifier used as part of a type hierarchy If the data type is a string, convert to use Utf8View if requested

This function is used during the schema conversion process to determine whether string data should be represented as StringArray (default) or StringViewArray.

use_utf8view: if true, use Utf8View instead of Utf8 for string types

See Resolver for more information

Source

fn resolve_type<'s>( &mut self, writer_schema: &'s Schema<'a>, reader_schema: &'s Schema<'a>, namespace: Option<&'a str>, ) -> Result<AvroDataType, ArrowError>

Source

fn coercion_from(dt: &AvroDataType) -> Promotion

Source

fn find_best_promotion( &mut self, writer: &Schema<'a>, reader_variants: &[Schema<'a>], namespace: Option<&'a str>, ) -> Option<(usize, Promotion)>

Source

fn resolve_unions<'s>( &mut self, writer_variants: &'s [Schema<'a>], reader_variants: &'s [Schema<'a>], namespace: Option<&'a str>, ) -> Result<AvroDataType, ArrowError>

Source

fn resolve_array( &mut self, writer_array: &Array<'a>, reader_array: &Array<'a>, namespace: Option<&'a str>, ) -> Result<AvroDataType, ArrowError>

Source

fn resolve_map( &mut self, writer_map: &Map<'a>, reader_map: &Map<'a>, namespace: Option<&'a str>, ) -> Result<AvroDataType, ArrowError>

Source

fn resolve_fixed<'s>( &mut self, writer_fixed: &Fixed<'a>, reader_fixed: &Fixed<'a>, reader_schema: &'s Schema<'a>, namespace: Option<&'a str>, ) -> Result<AvroDataType, ArrowError>

Source

fn resolve_primitives( &mut self, write_primitive: PrimitiveType, read_primitive: PrimitiveType, reader_schema: &Schema<'a>, ) -> Result<AvroDataType, ArrowError>

Source

fn resolve_nullable_union<'s>( &mut self, writer_variants: &'s [Schema<'a>], reader_variants: &'s [Schema<'a>], namespace: Option<&'a str>, ) -> Result<AvroDataType, ArrowError>

Source

fn resolve_enums( &mut self, writer_enum: &Enum<'a>, reader_enum: &Enum<'a>, reader_schema: &Schema<'a>, namespace: Option<&'a str>, ) -> Result<AvroDataType, ArrowError>

Source

fn resolve_records( &mut self, writer_record: &Record<'a>, reader_record: &Record<'a>, namespace: Option<&'a str>, ) -> Result<AvroDataType, ArrowError>

Auto Trait Implementations§

§

impl<'a> Freeze for Maker<'a>

§

impl<'a> RefUnwindSafe for Maker<'a>

§

impl<'a> Send for Maker<'a>

§

impl<'a> Sync for Maker<'a>

§

impl<'a> Unpin for Maker<'a>

§

impl<'a> UnwindSafe for Maker<'a>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

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

Source§

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

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

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

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> Same for T

Source§

type Output = T

Should always be Self
Source§

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

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

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

Performs the conversion.
Source§

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

Source§

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

The type returned in the event of a conversion error.
Source§

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

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> Allocation for T
where T: RefUnwindSafe + Send + Sync,