pub struct StructBuilder { /* private fields */ }
Expand description

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.

Implementations

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.

Returns the number of fields for the struct this builder is building.

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.

Appends a null element to the struct.

Builds the StructArray and reset this builder.

Trait Implementations

Returns the number of array slots in the builder.

Note that this always return the first child field builder’s length, and it is the caller’s responsibility to maintain the consistency that all the child field builder should have the equal number of elements.

Returns whether the number of array slots is zero

Builds the array.

Returns the builder as a non-mutable Any reference.

This is most useful when one wants to call non-mutable APIs on a specific builder type. In this case, one can first cast this into a Any, and then use downcast_ref to get a reference on the specific builder.

Returns the builder as a mutable Any reference.

This is most useful when one wants to call mutable APIs on a specific builder type. In this case, one can first cast this into a Any, and then use downcast_mut to get a reference on the specific builder.

Returns the boxed builder as a box of Any.

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.