Struct ObjectFieldBuilder
pub struct ObjectFieldBuilder<'o, 'v, 's, S>where
S: BuilderSpecificState,{
key: &'s str,
builder: &'o mut ObjectBuilder<'v, S>,
}
Expand description
A VariantBuilderExt
that inserts a new field into a variant object.
Fields§
§key: &'s str
§builder: &'o mut ObjectBuilder<'v, S>
Implementations§
§impl<'o, 'v, 's, S> ObjectFieldBuilder<'o, 'v, 's, S>where
S: BuilderSpecificState,
impl<'o, 'v, 's, S> ObjectFieldBuilder<'o, 'v, 's, S>where
S: BuilderSpecificState,
pub fn new( key: &'s str, builder: &'o mut ObjectBuilder<'v, S>, ) -> ObjectFieldBuilder<'o, 'v, 's, S>
Trait Implementations§
§impl<S> VariantBuilderExt for ObjectFieldBuilder<'_, '_, '_, S>where
S: BuilderSpecificState,
impl<S> VariantBuilderExt for ObjectFieldBuilder<'_, '_, '_, S>where
S: BuilderSpecificState,
§fn append_null(&mut self)
fn append_null(&mut self)
A NULL object field is interpreted as missing, so nothing gets inserted at all.
§type State<'a> = ObjectState<'a>
where
ObjectFieldBuilder<'_, '_, '_, S>: 'a
type State<'a> = ObjectState<'a> where ObjectFieldBuilder<'_, '_, '_, S>: 'a
The builder specific state used by nested builders
§fn append_value<'m, 'v>(&mut self, value: impl Into<Variant<'m, 'v>>)
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
.§fn try_new_list(
&mut self,
) -> Result<ListBuilder<'_, <ObjectFieldBuilder<'_, '_, '_, S> as VariantBuilderExt>::State<'_>>, ArrowError>
fn try_new_list( &mut self, ) -> Result<ListBuilder<'_, <ObjectFieldBuilder<'_, '_, '_, S> as VariantBuilderExt>::State<'_>>, 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
.§fn try_new_object(
&mut self,
) -> Result<ObjectBuilder<'_, <ObjectFieldBuilder<'_, '_, '_, S> as VariantBuilderExt>::State<'_>>, ArrowError>
fn try_new_object( &mut self, ) -> Result<ObjectBuilder<'_, <ObjectFieldBuilder<'_, '_, '_, S> as VariantBuilderExt>::State<'_>>, 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<'_, Self::State<'_>>
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<'_>>
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<'o, 'v, 's, S> Freeze for ObjectFieldBuilder<'o, 'v, 's, S>
impl<'o, 'v, 's, S> !RefUnwindSafe for ObjectFieldBuilder<'o, 'v, 's, S>
impl<'o, 'v, 's, S> !Send for ObjectFieldBuilder<'o, 'v, 's, S>
impl<'o, 'v, 's, S> !Sync for ObjectFieldBuilder<'o, 'v, 's, S>
impl<'o, 'v, 's, S> Unpin for ObjectFieldBuilder<'o, 'v, 's, S>
impl<'o, 'v, 's, S> !UnwindSafe for ObjectFieldBuilder<'o, 'v, 's, S>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more§impl<T> JsonToVariant for Twhere
T: VariantBuilderExt,
impl<T> JsonToVariant for Twhere
T: VariantBuilderExt,
§fn append_json(&mut self, json: &str) -> Result<(), ArrowError>
fn append_json(&mut self, json: &str) -> Result<(), ArrowError>
Create a Variant from a JSON string