[−][src]Struct jsondata::Property
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.
Methods
impl Property
[src]
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) -> Property where
T: ToString,
[src]
T: ToString,
pub fn key(self) -> String
[src]
pub fn key_ref(&self) -> &String
[src]
pub fn value(self) -> Json
[src]
pub fn value_ref(&self) -> &Json
[src]
pub fn value_mut(&mut self) -> &mut Json
[src]
pub fn set_key(&mut self, key: String)
[src]
pub fn set_value(&mut self, value: Json)
[src]
Trait Implementations
impl Eq for Property
[src]
impl PartialEq<Property> for Property
[src]
impl Clone for Property
[src]
fn clone(&self) -> Property
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl PartialOrd<Property> for Property
[src]
fn partial_cmp(&self, other: &Property) -> Option<Ordering>
[src]
fn lt(&self, other: &Property) -> bool
[src]
fn le(&self, other: &Property) -> bool
[src]
fn gt(&self, other: &Property) -> bool
[src]
fn ge(&self, other: &Property) -> bool
[src]
impl Debug for Property
[src]
Auto Trait Implementations
Blanket Implementations
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,