pub struct ObjectBuilder {
pub object: Object,
pub null: bool,
pub skip: bool,
pub root: Option<String>,
}
Fields§
§object: Object
§null: bool
§skip: bool
§root: Option<String>
Implementations§
Source§impl ObjectBuilder
impl ObjectBuilder
ObjectBuilder is used to produce JSON objects
pub fn new() -> ObjectBuilder
Sourcepub fn from_json(object: Value) -> Option<ObjectBuilder>
pub fn from_json(object: Value) -> Option<ObjectBuilder>
Initialize builder with initial value.
Sourcepub fn build<F>(builder: F) -> ObjectBuilderwhere
F: FnOnce(&mut ObjectBuilder),
pub fn build<F>(builder: F) -> ObjectBuilderwhere
F: FnOnce(&mut ObjectBuilder),
Create new builder, pass it to closure as mutable ref and return.
pub fn root(&mut self, root: &str)
pub fn has_root(&mut self) -> bool
Source§impl ObjectBuilder
impl ObjectBuilder
Source§impl ObjectBuilder
impl ObjectBuilder
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ObjectBuilder
impl RefUnwindSafe for ObjectBuilder
impl Send for ObjectBuilder
impl Sync for ObjectBuilder
impl Unpin for ObjectBuilder
impl UnwindSafe for ObjectBuilder
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