Enum ruma_signatures::CanonicalJsonValue [−][src]
Variants
Represents a JSON null value.
let v: CanonicalJsonValue = json!(null).try_into().unwrap();
Bool(bool)
Represents a JSON boolean.
let v: CanonicalJsonValue = json!(true).try_into().unwrap();
Represents a JSON integer.
let v: CanonicalJsonValue = json!(12).try_into().unwrap();
String(String)
Represents a JSON string.
let v: CanonicalJsonValue = json!("a string").try_into().unwrap();
Array(Vec<CanonicalJsonValue, Global>)
Represents a JSON array.
let v: CanonicalJsonValue = json!(["an", "array"]).try_into().unwrap();
Object(BTreeMap<String, CanonicalJsonValue>)
Represents a JSON object.
The map is backed by a BTreeMap to guarantee the sorting of keys.
let v: CanonicalJsonValue = json!({ "an": "object" }).try_into().unwrap();
Trait Implementations
impl Clone for CanonicalJsonValue
[src]
pub fn clone(&self) -> CanonicalJsonValue
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for CanonicalJsonValue
[src]
impl Default for CanonicalJsonValue
[src]
pub fn default() -> CanonicalJsonValue
[src]
impl<'de> Deserialize<'de> for CanonicalJsonValue
[src]
pub fn deserialize<D>(
deserializer: D
) -> Result<CanonicalJsonValue, <D as Deserializer<'de>>::Error> where
D: Deserializer<'de>,
[src]
deserializer: D
) -> Result<CanonicalJsonValue, <D as Deserializer<'de>>::Error> where
D: Deserializer<'de>,
impl Display for CanonicalJsonValue
[src]
pub fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>
[src]
Display this value as a string.
This Display
implementation is intentionally unaffected by any formatting parameters,
because adding extra whitespace or otherwise pretty-printing it would make it not the
canonical form anymore.
If you want to pretty-print a CanonicalJsonValue
for debugging purposes, use
one of serde_json::{to_string_pretty, to_vec_pretty, to_writer_pretty}
.
impl Eq for CanonicalJsonValue
[src]
impl PartialEq<CanonicalJsonValue> for CanonicalJsonValue
[src]
pub fn eq(&self, other: &CanonicalJsonValue) -> bool
[src]
pub fn ne(&self, other: &CanonicalJsonValue) -> bool
[src]
impl Serialize for CanonicalJsonValue
[src]
pub fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
S: Serializer,
[src]
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
S: Serializer,
impl StructuralEq for CanonicalJsonValue
[src]
impl StructuralPartialEq for CanonicalJsonValue
[src]
impl TryFrom<Value> for CanonicalJsonValue
[src]
Auto Trait Implementations
impl RefUnwindSafe for CanonicalJsonValue
impl Send for CanonicalJsonValue
impl Sync for CanonicalJsonValue
impl Unpin for CanonicalJsonValue
impl UnwindSafe for CanonicalJsonValue
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
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.
pub 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>,