pub enum DefaultScalarValue {
Int(i32),
Float(f64),
String(String),
Boolean(bool),
}
Expand description
The default ScalarValue
representation in juniper
.
These types closely follow the GraphQL specification.
Variants§
Int(i32)
Int
scalar as a signed 32‐bit numeric non‐fractional value.
Float(f64)
Float
scalar as a signed double‐precision fractional values as
specified by IEEE 754.
String(String)
String
scalar as a textual data, represented as UTF‐8 character
sequences.
Boolean(bool)
Boolean
scalar as a true
or false
value.
Trait Implementations§
Source§impl Clone for DefaultScalarValue
impl Clone for DefaultScalarValue
Source§fn clone(&self) -> DefaultScalarValue
fn clone(&self) -> DefaultScalarValue
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 DefaultScalarValue
impl Debug for DefaultScalarValue
Source§impl<'de> Deserialize<'de> for DefaultScalarValue
impl<'de> Deserialize<'de> for DefaultScalarValue
Source§fn deserialize<D: Deserializer<'de>>(de: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(de: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for DefaultScalarValue
impl Display for DefaultScalarValue
Source§impl<'___a> From<&'___a DefaultScalarValue> for Option<&'___a String>
impl<'___a> From<&'___a DefaultScalarValue> for Option<&'___a String>
Source§fn from(ty: &'___a DefaultScalarValue) -> Self
fn from(ty: &'___a DefaultScalarValue) -> Self
Converts to this type from the input type.
Source§impl<'___a> From<&'___a DefaultScalarValue> for Option<&'___a bool>
impl<'___a> From<&'___a DefaultScalarValue> for Option<&'___a bool>
Source§fn from(ty: &'___a DefaultScalarValue) -> Self
fn from(ty: &'___a DefaultScalarValue) -> Self
Converts to this type from the input type.
Source§impl<'___a> From<&'___a DefaultScalarValue> for Option<&'___a f64>
impl<'___a> From<&'___a DefaultScalarValue> for Option<&'___a f64>
Source§fn from(ty: &'___a DefaultScalarValue) -> Self
fn from(ty: &'___a DefaultScalarValue) -> Self
Converts to this type from the input type.
Source§impl<'___a> From<&'___a DefaultScalarValue> for Option<&'___a i32>
impl<'___a> From<&'___a DefaultScalarValue> for Option<&'___a i32>
Source§fn from(ty: &'___a DefaultScalarValue) -> Self
fn from(ty: &'___a DefaultScalarValue) -> Self
Converts to this type from the input type.
Source§impl<'a> From<&'a str> for DefaultScalarValue
impl<'a> From<&'a str> for DefaultScalarValue
Source§impl From<DefaultScalarValue> for Option<String>
impl From<DefaultScalarValue> for Option<String>
Source§fn from(ty: DefaultScalarValue) -> Self
fn from(ty: DefaultScalarValue) -> Self
Converts to this type from the input type.
Source§impl From<DefaultScalarValue> for Option<bool>
impl From<DefaultScalarValue> for Option<bool>
Source§fn from(ty: DefaultScalarValue) -> Self
fn from(ty: DefaultScalarValue) -> Self
Converts to this type from the input type.
Source§impl From<DefaultScalarValue> for Option<f64>
impl From<DefaultScalarValue> for Option<f64>
Source§fn from(ty: DefaultScalarValue) -> Self
fn from(ty: DefaultScalarValue) -> Self
Converts to this type from the input type.
Source§impl From<DefaultScalarValue> for Option<i32>
impl From<DefaultScalarValue> for Option<i32>
Source§fn from(ty: DefaultScalarValue) -> Self
fn from(ty: DefaultScalarValue) -> Self
Converts to this type from the input type.
Source§impl From<String> for DefaultScalarValue
impl From<String> for DefaultScalarValue
Source§impl From<bool> for DefaultScalarValue
impl From<bool> for DefaultScalarValue
Source§impl From<f64> for DefaultScalarValue
impl From<f64> for DefaultScalarValue
Source§impl From<i32> for DefaultScalarValue
impl From<i32> for DefaultScalarValue
Source§impl PartialEq for DefaultScalarValue
impl PartialEq for DefaultScalarValue
Source§impl ScalarValue for DefaultScalarValue
impl ScalarValue for DefaultScalarValue
Source§fn into_string(self) -> Option<String>
fn into_string(self) -> Option<String>
Source§fn is_type<'a, T>(&'a self) -> bool
fn is_type<'a, T>(&'a self) -> bool
Checks whether this
ScalarValue
contains the value of the given
type. Read moreSource§fn into_another<S: ScalarValue>(self) -> S
fn into_another<S: ScalarValue>(self) -> S
Converts this
ScalarValue
into another one.Source§impl Serialize for DefaultScalarValue
impl Serialize for DefaultScalarValue
impl StructuralPartialEq for DefaultScalarValue
Auto Trait Implementations§
impl Freeze for DefaultScalarValue
impl RefUnwindSafe for DefaultScalarValue
impl Send for DefaultScalarValue
impl Sync for DefaultScalarValue
impl Unpin for DefaultScalarValue
impl UnwindSafe for DefaultScalarValue
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