Enum ruma::push::ScalarJsonValue
source · pub enum ScalarJsonValue {
Null,
Bool(bool),
Integer(Int),
String(String),
}
Expand description
Scalar (non-compound) JSON values.
Variants§
Null
Represents a null
value.
Bool(bool)
Represents a boolean.
Integer(Int)
Represents an integer.
String(String)
Represents a string.
Implementations§
Trait Implementations§
source§impl Clone for ScalarJsonValue
impl Clone for ScalarJsonValue
source§fn clone(&self) -> ScalarJsonValue
fn clone(&self) -> ScalarJsonValue
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for ScalarJsonValue
impl Debug for ScalarJsonValue
source§impl Default for ScalarJsonValue
impl Default for ScalarJsonValue
source§fn default() -> ScalarJsonValue
fn default() -> ScalarJsonValue
Returns the “default value” for a type. Read more
source§impl<'de> Deserialize<'de> for ScalarJsonValue
impl<'de> Deserialize<'de> for ScalarJsonValue
source§fn deserialize<D>(
deserializer: D,
) -> Result<ScalarJsonValue, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D,
) -> Result<ScalarJsonValue, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl From<&str> for ScalarJsonValue
impl From<&str> for ScalarJsonValue
source§fn from(value: &str) -> ScalarJsonValue
fn from(value: &str) -> ScalarJsonValue
Converts to this type from the input type.
source§impl From<Int> for ScalarJsonValue
impl From<Int> for ScalarJsonValue
source§fn from(value: Int) -> ScalarJsonValue
fn from(value: Int) -> ScalarJsonValue
Converts to this type from the input type.
source§impl From<String> for ScalarJsonValue
impl From<String> for ScalarJsonValue
source§fn from(value: String) -> ScalarJsonValue
fn from(value: String) -> ScalarJsonValue
Converts to this type from the input type.
source§impl From<bool> for ScalarJsonValue
impl From<bool> for ScalarJsonValue
source§fn from(value: bool) -> ScalarJsonValue
fn from(value: bool) -> ScalarJsonValue
Converts to this type from the input type.
source§impl PartialEq<FlattenedJsonValue> for ScalarJsonValue
impl PartialEq<FlattenedJsonValue> for ScalarJsonValue
source§fn eq(&self, other: &FlattenedJsonValue) -> bool
fn eq(&self, other: &FlattenedJsonValue) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialEq<ScalarJsonValue> for FlattenedJsonValue
impl PartialEq<ScalarJsonValue> for FlattenedJsonValue
source§fn eq(&self, other: &ScalarJsonValue) -> bool
fn eq(&self, other: &ScalarJsonValue) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialEq for ScalarJsonValue
impl PartialEq for ScalarJsonValue
source§fn eq(&self, other: &ScalarJsonValue) -> bool
fn eq(&self, other: &ScalarJsonValue) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for ScalarJsonValue
impl Serialize for ScalarJsonValue
source§fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl Eq for ScalarJsonValue
impl StructuralPartialEq for ScalarJsonValue
Auto Trait Implementations§
impl Freeze for ScalarJsonValue
impl RefUnwindSafe for ScalarJsonValue
impl Send for ScalarJsonValue
impl Sync for ScalarJsonValue
impl Unpin for ScalarJsonValue
impl UnwindSafe for ScalarJsonValue
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.