Enum bd::json::Json [−][src]
pub enum Json { Null, Bool(bool), Integer(i128), Float(f64), String(String), Array(Vec<Json>), Object(Vec<KeyValue>), }
Variants
Null
Bool(bool)
Integer(i128)
Float(f64)
String(String)
Array(Vec<Json>)
Object(Vec<KeyValue>)
Methods
impl Json
[src]
impl Json
pub fn is_array(&self) -> bool
[src]
pub fn is_array(&self) -> bool
pub fn is_object(&self) -> bool
[src]
pub fn is_object(&self) -> bool
pub fn array_ref(&self) -> Result<&Vec<Json>>
[src]
pub fn array_ref(&self) -> Result<&Vec<Json>>
pub fn array_mut(&mut self) -> Result<&mut Vec<Json>>
[src]
pub fn array_mut(&mut self) -> Result<&mut Vec<Json>>
pub fn object_ref(&self) -> Result<&Vec<KeyValue>>
[src]
pub fn object_ref(&self) -> Result<&Vec<KeyValue>>
pub fn object_mut(&mut self) -> Result<&mut Vec<KeyValue>>
[src]
pub fn object_mut(&mut self) -> Result<&mut Vec<KeyValue>>
pub fn index_ref(&self, i: usize) -> Result<&Json>
[src]
pub fn index_ref(&self, i: usize) -> Result<&Json>
pub fn index_mut(&mut self, i: usize) -> Result<&mut Json>
[src]
pub fn index_mut(&mut self, i: usize) -> Result<&mut Json>
pub fn get<'a>(self, key: &'a str) -> Result<Json>
[src]
pub fn get<'a>(self, key: &'a str) -> Result<Json>
pub fn get_ref<'a>(&self, key: &'a str) -> Result<&Json>
[src]
pub fn get_ref<'a>(&self, key: &'a str) -> Result<&Json>
pub fn get_mut<'a>(&mut self, key: &'a str) -> Result<&mut Json>
[src]
pub fn get_mut<'a>(&mut self, key: &'a str) -> Result<&mut Json>
pub fn upsert_key(&mut self, kv: KeyValue)
[src]
pub fn upsert_key(&mut self, kv: KeyValue)
pub fn do_recurse(&self, list: &mut Vec<Json>)
[src]
pub fn do_recurse(&self, list: &mut Vec<Json>)
Trait Implementations
impl Clone for Json
[src]
impl Clone for Json
fn clone(&self) -> Json
[src]
fn clone(&self) -> Json
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl Debug for Json
[src]
impl Debug for Json
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl PartialEq for Json
[src]
impl PartialEq for Json
fn eq(&self, other: &Json) -> bool
[src]
fn eq(&self, other: &Json) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Json) -> bool
[src]
fn ne(&self, other: &Json) -> bool
This method tests for !=
.
impl PartialOrd for Json
[src]
impl PartialOrd for Json
fn partial_cmp(&self, other: &Json) -> Option<Ordering>
[src]
fn partial_cmp(&self, other: &Json) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, other: &Json) -> bool
[src]
fn lt(&self, other: &Json) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
fn le(&self, other: &Json) -> bool
[src]
fn le(&self, other: &Json) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
fn gt(&self, other: &Json) -> bool
[src]
fn gt(&self, other: &Json) -> bool
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
fn ge(&self, other: &Json) -> bool
[src]
fn ge(&self, other: &Json) -> bool
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
impl From<bool> for Json
[src]
impl From<bool> for Json
impl From<Json> for bool
[src]
impl From<Json> for bool
impl FromStr for Json
[src]
impl FromStr for Json
type Err = Error
The associated error which can be returned from parsing.
fn from_str(text: &str) -> Result<Json>
[src]
fn from_str(text: &str) -> Result<Json>
Parses a string s
to return a value of this type. Read more
impl Display for Json
[src]
impl Display for Json
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Index<usize> for Json
[src]
impl Index<usize> for Json
type Output = Json
The returned type after indexing.
fn index(&self, off: usize) -> &Json
[src]
fn index(&self, off: usize) -> &Json
Performs the indexing (container[index]
) operation.
impl IndexMut<usize> for Json
[src]
impl IndexMut<usize> for Json
fn index_mut(&mut self, off: usize) -> &mut Json
[src]
fn index_mut(&mut self, off: usize) -> &mut Json
Performs the mutable indexing (container[index]
) operation.
impl<'a> Index<&'a str> for Json
[src]
impl<'a> Index<&'a str> for Json
type Output = Json
The returned type after indexing.
fn index(&self, key: &str) -> &Json
[src]
fn index(&self, key: &str) -> &Json
Performs the indexing (container[index]
) operation.
impl<'a> IndexMut<&'a str> for Json
[src]
impl<'a> IndexMut<&'a str> for Json
fn index_mut(&mut self, key: &str) -> &mut Json
[src]
fn index_mut(&mut self, key: &str) -> &mut Json
Performs the mutable indexing (container[index]
) operation.
impl Index<Range<usize>> for Json
[src]
impl Index<Range<usize>> for Json
type Output = [Json]
The returned type after indexing.
fn index(&self, r: Range<usize>) -> &[Json]
[src]
fn index(&self, r: Range<usize>) -> &[Json]
Performs the indexing (container[index]
) operation.
impl Index<RangeFrom<usize>> for Json
[src]
impl Index<RangeFrom<usize>> for Json
type Output = [Json]
The returned type after indexing.
fn index(&self, r: RangeFrom<usize>) -> &[Json]
[src]
fn index(&self, r: RangeFrom<usize>) -> &[Json]
Performs the indexing (container[index]
) operation.
impl Index<RangeTo<usize>> for Json
[src]
impl Index<RangeTo<usize>> for Json
type Output = [Json]
The returned type after indexing.
fn index(&self, r: RangeTo<usize>) -> &[Json]
[src]
fn index(&self, r: RangeTo<usize>) -> &[Json]
Performs the indexing (container[index]
) operation.
impl Index<RangeToInclusive<usize>> for Json
[src]
impl Index<RangeToInclusive<usize>> for Json
type Output = [Json]
The returned type after indexing.
fn index(&self, r: RangeToInclusive<usize>) -> &[Json]
[src]
fn index(&self, r: RangeToInclusive<usize>) -> &[Json]
Performs the indexing (container[index]
) operation.
impl Index<RangeInclusive<usize>> for Json
[src]
impl Index<RangeInclusive<usize>> for Json
type Output = [Json]
The returned type after indexing.
fn index(&self, r: RangeInclusive<usize>) -> &[Json]
[src]
fn index(&self, r: RangeInclusive<usize>) -> &[Json]
Performs the indexing (container[index]
) operation.
impl Index<RangeFull> for Json
[src]
impl Index<RangeFull> for Json
type Output = [Json]
The returned type after indexing.
fn index(&self, r: RangeFull) -> &[Json]
[src]
fn index(&self, r: RangeFull) -> &[Json]
Performs the indexing (container[index]
) operation.
impl Neg for Json
[src]
impl Neg for Json
type Output = Json
The resulting type after applying the -
operator.
fn neg(self) -> Json
[src]
fn neg(self) -> Json
Performs the unary -
operation.
impl Not for Json
[src]
impl Not for Json
type Output = Json
The resulting type after applying the !
operator.
fn not(self) -> Json
[src]
fn not(self) -> Json
Performs the unary !
operation.
impl Mul for Json
[src]
impl Mul for Json
type Output = Json
The resulting type after applying the *
operator.
fn mul(self, rhs: Json) -> Json
[src]
fn mul(self, rhs: Json) -> Json
Performs the *
operation.
impl Div for Json
[src]
impl Div for Json
type Output = Json
The resulting type after applying the /
operator.
fn div(self, rhs: Json) -> Json
[src]
fn div(self, rhs: Json) -> Json
Performs the /
operation.
impl Rem for Json
[src]
impl Rem for Json
type Output = Json
The resulting type after applying the %
operator.
fn rem(self, rhs: Json) -> Json
[src]
fn rem(self, rhs: Json) -> Json
Performs the %
operation.
impl Add for Json
[src]
impl Add for Json
type Output = Json
The resulting type after applying the +
operator.
fn add(self, rhs: Json) -> Json
[src]
fn add(self, rhs: Json) -> Json
Performs the +
operation.
impl Sub for Json
[src]
impl Sub for Json
type Output = Json
The resulting type after applying the -
operator.
fn sub(self, rhs: Json) -> Json
[src]
fn sub(self, rhs: Json) -> Json
Performs the -
operation.
impl Shr for Json
[src]
impl Shr for Json
type Output = Json
The resulting type after applying the >>
operator.
fn shr(self, rhs: Json) -> Json
[src]
fn shr(self, rhs: Json) -> Json
Performs the >>
operation.
impl Shl for Json
[src]
impl Shl for Json
type Output = Json
The resulting type after applying the <<
operator.
fn shl(self, rhs: Json) -> Json
[src]
fn shl(self, rhs: Json) -> Json
Performs the <<
operation.
impl BitAnd for Json
[src]
impl BitAnd for Json
type Output = Json
The resulting type after applying the &
operator.
fn bitand(self, rhs: Json) -> Json
[src]
fn bitand(self, rhs: Json) -> Json
Performs the &
operation.
impl BitXor for Json
[src]
impl BitXor for Json
type Output = Json
The resulting type after applying the ^
operator.
fn bitxor(self, rhs: Json) -> Json
[src]
fn bitxor(self, rhs: Json) -> Json
Performs the ^
operation.
impl BitOr for Json
[src]
impl BitOr for Json