VariantArrayVariantBuilder

Struct VariantArrayVariantBuilder 

Source
pub struct VariantArrayVariantBuilder<'a> {
    parent_state: ParentState<'a>,
    metadata_offsets: &'a mut Vec<usize>,
    value_offsets: &'a mut Vec<usize>,
    nulls: &'a mut NullBufferBuilder,
}
Expand description

A VariantBuilderExt that writes directly to the buffers of a VariantArrayBuilder.

If Self::finish is not called, any changes will be rolled back

See VariantArrayBuilder::variant_builder for an example

Fields§

§parent_state: ParentState<'a>§metadata_offsets: &'a mut Vec<usize>§value_offsets: &'a mut Vec<usize>§nulls: &'a mut NullBufferBuilder

Implementations§

Source§

impl<'a> VariantArrayVariantBuilder<'a>

Source

fn new(builder: &'a mut VariantArrayBuilder) -> Self

Constructs a new VariantArrayVariantBuilder

Note this is not public as this is a structure that is logically part of the VariantArrayBuilder and relies on its internal structure

Source

pub fn finish(self)

Called to finish the in progress variant and write it to the underlying buffers

Note if you do not call finish, on drop any changes made to the underlying buffers will be rolled back.

Source

fn parent_state(&mut self) -> ParentState<'_>

Trait Implementations§

Source§

impl Drop for VariantArrayVariantBuilder<'_>

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

impl VariantBuilderExt for VariantArrayVariantBuilder<'_>

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<'_>, ArrowError>

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<'_>, ArrowError>

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<'_>

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<'_>

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§

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.

§

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

§

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

Create a Variant from a JSON string
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