[][src]Struct jsondata::Property

pub struct 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]

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_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl PartialOrd<Property> for Property[src]

impl Debug for Property[src]

Auto Trait Implementations

impl Send for Property

impl Sync for Property

Blanket Implementations

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]