[−][src]Struct validators::json_object::JSONObject
Methods
impl JSONObject
[src]
impl JSONObject
pub fn get_json_value(&self) -> &Value
[src]
pub fn get_json_value(&self) -> &Value
pub fn into_map(self) -> Map<String, Value>
[src]
pub fn into_map(self) -> Map<String, Value>
pub fn into_value(self) -> Value
[src]
pub fn into_value(self) -> Value
impl JSONObject
[src]
impl JSONObject
pub fn from_string(full_json_object: String) -> Result<Self, JSONObjectError>
[src]
pub fn from_string(full_json_object: String) -> Result<Self, JSONObjectError>
pub fn from_str(full_json_object: &str) -> Result<Self, JSONObjectError>
[src]
pub fn from_str(full_json_object: &str) -> Result<Self, JSONObjectError>
Methods from Deref<Target = Map<String, Value>>
pub fn clear(&mut self)
[src]
pub fn clear(&mut self)
Clears the map, removing all values.
pub fn get<Q>(&self, key: &Q) -> Option<&Value> where
Q: Ord + Eq + Hash + ?Sized,
String: Borrow<Q>,
[src]
pub fn get<Q>(&self, key: &Q) -> Option<&Value> where
Q: Ord + Eq + Hash + ?Sized,
String: Borrow<Q>,
Returns a reference to the value corresponding to the key.
The key may be any borrowed form of the map's key type, but the ordering on the borrowed form must match the ordering on the key type.
pub fn contains_key<Q>(&self, key: &Q) -> bool where
Q: Ord + Eq + Hash + ?Sized,
String: Borrow<Q>,
[src]
pub fn contains_key<Q>(&self, key: &Q) -> bool where
Q: Ord + Eq + Hash + ?Sized,
String: Borrow<Q>,
Returns true if the map contains a value for the specified key.
The key may be any borrowed form of the map's key type, but the ordering on the borrowed form must match the ordering on the key type.
pub fn get_mut<Q>(&mut self, key: &Q) -> Option<&mut Value> where
Q: Ord + Eq + Hash + ?Sized,
String: Borrow<Q>,
[src]
pub fn get_mut<Q>(&mut self, key: &Q) -> Option<&mut Value> where
Q: Ord + Eq + Hash + ?Sized,
String: Borrow<Q>,
Returns a mutable reference to the value corresponding to the key.
The key may be any borrowed form of the map's key type, but the ordering on the borrowed form must match the ordering on the key type.
pub fn insert(&mut self, k: String, v: Value) -> Option<Value>
[src]
pub fn insert(&mut self, k: String, v: Value) -> Option<Value>
Inserts a key-value pair into the map.
If the map did not have this key present, None
is returned.
If the map did have this key present, the value is updated, and the old value is returned.
pub fn remove<Q>(&mut self, key: &Q) -> Option<Value> where
Q: Ord + Eq + Hash + ?Sized,
String: Borrow<Q>,
[src]
pub fn remove<Q>(&mut self, key: &Q) -> Option<Value> where
Q: Ord + Eq + Hash + ?Sized,
String: Borrow<Q>,
Removes a key from the map, returning the value at the key if the key was previously in the map.
The key may be any borrowed form of the map's key type, but the ordering on the borrowed form must match the ordering on the key type.
pub fn entry<S>(&mut self, key: S) -> Entry where
S: Into<String>,
[src]
pub fn entry<S>(&mut self, key: S) -> Entry where
S: Into<String>,
Gets the given key's corresponding entry in the map for in-place manipulation.
pub fn len(&self) -> usize
[src]
pub fn len(&self) -> usize
Returns the number of elements in the map.
pub fn is_empty(&self) -> bool
[src]
pub fn is_empty(&self) -> bool
Returns true if the map contains no elements.
pub fn iter(&self) -> Iter
[src]
pub fn iter(&self) -> Iter
Gets an iterator over the entries of the map.
pub fn iter_mut(&mut self) -> IterMut
[src]
pub fn iter_mut(&mut self) -> IterMut
Gets a mutable iterator over the entries of the map.
pub fn keys(&self) -> Keys
[src]
pub fn keys(&self) -> Keys
Gets an iterator over the keys of the map.
pub fn values(&self) -> Values
[src]
pub fn values(&self) -> Values
Gets an iterator over the values of the map.
pub fn values_mut(&mut self) -> ValuesMut
[src]
pub fn values_mut(&mut self) -> ValuesMut
Gets an iterator over mutable values of the map.
Trait Implementations
impl Validated for JSONObject
[src]
impl Validated for JSONObject
impl ValidatedWrapper for JSONObject
[src]
impl ValidatedWrapper for JSONObject
type Error = JSONObjectError
fn from_string(json_object: String) -> Result<Self, Self::Error>
[src]
fn from_string(json_object: String) -> Result<Self, Self::Error>
fn from_str(json_object: &str) -> Result<Self, Self::Error>
[src]
fn from_str(json_object: &str) -> Result<Self, Self::Error>
impl PartialEq<JSONObject> for JSONObject
[src]
impl PartialEq<JSONObject> for JSONObject
fn eq(&self, other: &Self) -> bool
[src]
fn eq(&self, other: &Self) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Self) -> bool
[src]
fn ne(&self, other: &Self) -> bool
This method tests for !=
.
impl Clone for JSONObject
[src]
impl Clone for JSONObject
fn clone(&self) -> JSONObject
[src]
fn clone(&self) -> JSONObject
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 Eq for JSONObject
[src]
impl Eq for JSONObject
impl DerefMut for JSONObject
[src]
impl DerefMut for JSONObject
impl Deref for JSONObject
[src]
impl Deref for JSONObject
type Target = Map<String, Value>
The resulting type after dereferencing.
fn deref(&self) -> &Self::Target
[src]
fn deref(&self) -> &Self::Target
Dereferences the value.
impl Debug for JSONObject
[src]
impl Debug for JSONObject
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 Display for JSONObject
[src]
impl Display for JSONObject
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 Hash for JSONObject
[src]
impl Hash for JSONObject
fn hash<H: Hasher>(&self, state: &mut H)
[src]
fn hash<H: Hasher>(&self, state: &mut H)
Feeds this value into the given [Hasher
]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl<'a> FromParam<'a> for JSONObject
[src]
impl<'a> FromParam<'a> for JSONObject
type Error = JSONObjectError
The associated error to be returned when parsing fails.
fn from_param(param: &'a RawStr) -> Result<Self, Self::Error>
[src]
fn from_param(param: &'a RawStr) -> Result<Self, Self::Error>
Parses an instance of Self
from a dynamic path parameter string or returns an Error
if one cannot be parsed. Read more
impl<'a> FromFormValue<'a> for JSONObject
[src]
impl<'a> FromFormValue<'a> for JSONObject
type Error = JSONObjectError
The associated error which can be returned from parsing. It is a good idea to have the return type be or contain an &'v str
so that the unparseable string can be examined after a bad parse. Read more
fn from_form_value(form_value: &'a RawStr) -> Result<Self, Self::Error>
[src]
fn from_form_value(form_value: &'a RawStr) -> Result<Self, Self::Error>
Parses an instance of Self
from an HTTP form field value or returns an Error
if one cannot be parsed. Read more
fn default() -> Option<Self>
[src]
fn default() -> Option<Self>
Returns a default value to be used when the form field does not exist. If this returns None
, then the field is required. Otherwise, this should return Some(default_value)
. The default implementation simply returns None
. Read more
impl Serialize for JSONObject
[src]
impl Serialize for JSONObject
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error> where
S: Serializer,
[src]
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error> where
S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl<'de> Deserialize<'de> for JSONObject
[src]
impl<'de> Deserialize<'de> for JSONObject
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error> where
D: Deserializer<'de>,
[src]
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error> where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations
impl Send for JSONObject
impl Send for JSONObject
impl Sync for JSONObject
impl Sync for JSONObject
Blanket Implementations
impl<T, U> Into for T where
U: From<T>,
[src]
impl<T, U> Into for T where
U: From<T>,
impl<T> ToString for T where
T: Display + ?Sized,
[src]
impl<T> ToString for T where
T: Display + ?Sized,
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
type Owned = T
fn to_owned(&self) -> T
[src]
fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
fn clone_into(&self, target: &mut T)
[src]
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
impl<T> From for T
[src]
impl<T> From for T
impl<T, U> TryFrom for T where
T: From<U>,
[src]
impl<T, U> TryFrom for T where
T: From<U>,
type Error = !
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
try_from
)Performs the conversion.
impl<T> Borrow for T where
T: ?Sized,
[src]
impl<T> Borrow for T where
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
impl<T> BorrowMut for T where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
try_from
)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
try_from
)Performs the conversion.
impl<T> Any for T where
T: 'static + ?Sized,
[src]
impl<T> Any for T where
T: 'static + ?Sized,
fn get_type_id(&self) -> TypeId
[src]
fn get_type_id(&self) -> TypeId
🔬 This is a nightly-only experimental API. (get_type_id
)
this method will likely be replaced by an associated static
Gets the TypeId
of self
. Read more
impl<T> Typeable for T where
T: Any,
impl<T> Typeable for T where
T: Any,
impl<T> DeserializeOwned for T where
T: Deserialize<'de>,
[src]
impl<T> DeserializeOwned for T where
T: Deserialize<'de>,