Skip to main content

TopLevelRowSink

Struct TopLevelRowSink 

Source
struct TopLevelRowSink<B>(B);
Expand description

Wraps the sink that every top-level row is appended into. The row builders signal a missing value (value and typed_value both NULL) by calling append_null, and this wrapper gives that signal its top-level meaning: Variant::Null, because the non-nullable output value column cannot hold a physical NULL. Array-level NULL rows are appended before the sink is built, so they never reach it. Nested builders created via try_new_object/try_new_list are returned unwrapped, so nested missing values keep their own semantics, e.g. [ObjectFieldBuilder] omits the field.

Tuple Fields§

§0: B

Trait Implementations§

Source§

impl<B: VariantBuilderExt> VariantBuilderExt for TopLevelRowSink<B>

Source§

type State<'a> = <B as VariantBuilderExt>::State<'a> where Self: 'a

The builder specific state used by nested builders
Source§

fn append_null(&mut self)

Appends a NULL value to this builder. The semantics depend on the implementation, but will often translate to appending a [Variant::Null] value.
Source§

fn append_value<'m, 'v>(&mut self, value: impl Into<Variant<'m, 'v>>)

Appends a new variant value to this builder. See e.g. [VariantBuilder::append_value].
Source§

fn try_new_list(&mut self) -> Result<ListBuilder<'_, Self::State<'_>>>

Creates a nested list builder. See e.g. [VariantBuilder::new_list]. Returns an error if the nested builder cannot be created, see e.g. [ObjectBuilder::try_new_list].
Source§

fn try_new_object(&mut self) -> Result<ObjectBuilder<'_, Self::State<'_>>>

Creates a nested object builder. See e.g. [VariantBuilder::new_object]. Returns an error if the nested builder cannot be created, see e.g. [ObjectBuilder::try_new_object].
§

fn new_list(&mut self) -> ListBuilder<'_, Self::State<'_>>

Creates a nested list builder. See e.g. [VariantBuilder::new_list]. Panics if the nested builder cannot be created, see e.g. [ObjectBuilder::new_list].
§

fn new_object(&mut self) -> ObjectBuilder<'_, Self::State<'_>>

Creates a nested object builder. See e.g. [VariantBuilder::new_object]. Panics if the nested builder cannot be created, see e.g. [ObjectBuilder::new_object].

Auto Trait Implementations§

§

impl<B> Freeze for TopLevelRowSink<B>
where B: Freeze,

§

impl<B> RefUnwindSafe for TopLevelRowSink<B>
where B: RefUnwindSafe,

§

impl<B> Send for TopLevelRowSink<B>
where B: Send,

§

impl<B> Sync for TopLevelRowSink<B>
where B: Sync,

§

impl<B> Unpin for TopLevelRowSink<B>
where B: Unpin,

§

impl<B> UnsafeUnpin for TopLevelRowSink<B>
where B: UnsafeUnpin,

§

impl<B> UnwindSafe for TopLevelRowSink<B>
where B: UnwindSafe,

Blanket Implementations§

§

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

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
§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

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.

§

impl<T> JsonToVariant for T
where T: VariantBuilderExt,

§

fn append_json(&mut self, json: &str) -> Result<(), ArrowError>

Create a Variant from a JSON string
§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

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<T> Ungil for T
where T: Send,