pub struct Object { /* private fields */ }Expand description
An object, with its members in the order they are written.
Implementations§
Source§impl Object
impl Object
Sourcepub const fn members_mut(&mut self) -> &mut Vec<Member>
pub const fn members_mut(&mut self) -> &mut Vec<Member>
The members, to add, remove, reorder, or change. A change here can make a document that is not valid, such as one with two members with the same key; Document::to_value finds that. Document::set and Document::remove keep the document valid and lay out what they add.
Sourcepub const fn is_braced(&self) -> bool
pub const fn is_braced(&self) -> bool
Whether the object is written with braces. Only a top-level object can be written without them.
Sourcepub const fn closing_decor(&self) -> &str
pub const fn closing_decor(&self) -> &str
The text after the last member: before the closing }, or at the end of a top-level object without braces.
Sourcepub const fn closing_decor_mut(&mut self) -> &mut String
pub const fn closing_decor_mut(&mut self) -> &mut String
The text after the last member, to change.
Trait Implementations§
impl StructuralPartialEq for Object
Auto Trait Implementations§
impl Freeze for Object
impl RefUnwindSafe for Object
impl Send for Object
impl Sync for Object
impl Unpin for Object
impl UnsafeUnpin for Object
impl UnwindSafe for Object
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