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§
source§impl ScalarJsonValue
impl ScalarJsonValue
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 for ScalarJsonValue
impl PartialEq for ScalarJsonValue
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
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.source§impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
source§impl<T> Identity for Twhere
T: ?Sized,
impl<T> Identity for Twhere
T: ?Sized,
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more