[−][src]Struct arrow::array::StructBuilder
Array builder for Struct types.
Note that callers should make sure that methods of all the child field builders are properly called to maintain the consistency of the data structure.
Methods
impl StructBuilder
[src]
pub fn new(fields: Vec<Field>, builders: Vec<Box<dyn ArrayBuilder>>) -> Self
[src]
pub fn from_schema(schema: Schema, capacity: usize) -> Self
[src]
pub fn field_builder<T: ArrayBuilder>(&mut self, i: usize) -> Option<&mut T>
[src]
Returns a mutable reference to the child field builder at index i
.
Result will be None
if the input type T
provided doesn't match the actual
field builder's type.
pub fn num_fields(&self) -> usize
[src]
Returns the number of fields for the struct this builder is building.
pub fn append(&mut self, is_valid: bool) -> Result<()>
[src]
Appends an element (either null or non-null) to the struct. The actual elements should be appended for each child sub-array in a consistent way.
pub fn append_null(&mut self) -> Result<()>
[src]
Appends a null element to the struct.
pub fn finish(&mut self) -> StructArray
[src]
Builds the StructArray
and reset this builder.
Trait Implementations
impl Drop for StructBuilder
[src]
Auto Trait Implementations
impl !Send for StructBuilder
impl Unpin for StructBuilder
impl !Sync for StructBuilder
impl !UnwindSafe for StructBuilder
impl !RefUnwindSafe for StructBuilder
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> FromCast<T> for T
[src]
impl<T, U> Cast<U> for T where
U: FromCast<T>,
[src]
U: FromCast<T>,