AvroFieldBuilder

结构体 AvroFieldBuilder 

源代码
pub(crate) struct AvroFieldBuilder<'a> {
    writer_schema: &'a Schema<'a>,
    reader_schema: Option<&'a Schema<'a>>,
    use_utf8view: bool,
    strict_mode: bool,
}
展开描述

AvroField 的构建器

字段§

§writer_schema: &'a Schema<'a>§reader_schema: Option<&'a Schema<'a>>§use_utf8view: bool§strict_mode: bool

实现§

源码§

impl<'a> AvroFieldBuilder<'a>

源代码

pub(crate) fn new(writer_schema: &'a Schema<'a>) -> Self

为给定的写入方模式(writer schema)创建一个新的 AvroFieldBuilder

源代码

pub(crate) fn with_reader_schema(self, reader_schema: &'a Schema<'a>) -> Self

设置用于模式解析(schema resolution)的读取方模式(reader schema)。

如果提供了读取方模式,构建器将生成一个已解析的 AvroField,它可以处理写入方和读取方模式之间的差异。

源代码

pub(crate) fn with_utf8view(self, use_utf8view: bool) -> Self

启用或禁用 Utf8View 支持

源代码

pub(crate) fn with_strict_mode(self, strict_mode: bool) -> Self

启用或禁用严格模式。

源代码

pub(crate) fn build(self) -> Result<AvroField, ArrowError>

从构建器构建一个 AvroField

Trait 实现§

源码§

impl<'a> Debug for AvroFieldBuilder<'a>

源码§

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

使用给定的格式化程序格式化值。 阅读更多

自动 Trait 实现§

§

impl<'a> Freeze for AvroFieldBuilder<'a>

§

impl<'a> RefUnwindSafe for AvroFieldBuilder<'a>

§

impl<'a> Send for AvroFieldBuilder<'a>

§

impl<'a> Sync for AvroFieldBuilder<'a>

§

impl<'a> Unpin for AvroFieldBuilder<'a>

§

impl<'a> UnwindSafe for AvroFieldBuilder<'a>

通用实现§

§

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

§

fn type_id(&self) -> TypeId

获取 selfTypeId阅读更多
§

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

§

fn borrow(&self) -> &T

从拥有的值进行不可变借用。 阅读更多
§

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

§

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

从拥有的值进行可变借用。 阅读更多
§

impl<T> From<T> for T

§

fn from(t: T) -> T

返回未更改的参数。

§

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

§

fn into(self) -> U

调用 U::from(self)

也就是说,此转换是 From<T> for U 的实现选择执行的任何操作。

§

impl<T> Same for T

§

type Output = T

应该总是 Self
§

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

§

type Error = Infallible

转换错误时返回的类型。
§

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

执行转换。
§

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

§

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

转换错误时返回的类型。
§

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

执行转换。
§

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,