pub struct Property(/* private fields */);
Expand description
Property type captures a single (key,value) pair in a JSON object.
Where,
- key is String type, defined by JSON specification.
- value is JSON value.
Implements PartialEq and PartialOrd for equality and ordering.
Implementations§
Source§impl Property
Following inherent methods are self explanatory, typically
used to move, or obtain a reference for key or value
component of a property.
impl Property
Following inherent methods are self explanatory, typically used to move, or obtain a reference for key or value component of a property.
pub fn new<T>(key: T, value: Json) -> Propertywhere
T: ToString,
pub fn into_key(self) -> String
pub fn as_key(&self) -> &str
pub fn into_value(self) -> Json
pub fn as_value(&self) -> &Json
pub fn as_mut_value(&mut self) -> &mut Json
pub fn set_key(&mut self, key: String)
pub fn set_value(&mut self, value: Json)
Trait Implementations§
Source§impl PartialOrd for Property
impl PartialOrd for Property
impl Eq for Property
impl StructuralPartialEq for Property
Auto Trait Implementations§
impl Freeze for Property
impl RefUnwindSafe for Property
impl Send for Property
impl Sync for Property
impl Unpin for Property
impl UnwindSafe for Property
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