Enum juniper::DefaultScalarValue
source · pub enum DefaultScalarValue {
Int(i32),
Float(f64),
String(String),
Boolean(bool),
}Expand description
The default scalar value representation in juniper
This types closely follows the graphql specification.
Variants§
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 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(t: &'a DefaultScalarValue) -> Self
fn from(t: &'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(t: &'a DefaultScalarValue) -> Self
fn from(t: &'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(t: &'a DefaultScalarValue) -> Self
fn from(t: &'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(t: &'a DefaultScalarValue) -> Self
fn from(t: &'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(t: DefaultScalarValue) -> Self
fn from(t: 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(t: DefaultScalarValue) -> Self
fn from(t: 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(t: DefaultScalarValue) -> Self
fn from(t: 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(t: DefaultScalarValue) -> Self
fn from(t: 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§fn eq(&self, other: &DefaultScalarValue) -> bool
fn eq(&self, other: &DefaultScalarValue) -> bool
This method tests for
self and other values to be equal, and is used
by ==.source§impl ScalarValue for DefaultScalarValue
impl ScalarValue for DefaultScalarValue
source§fn as_int(&self) -> Option<i32>
fn as_int(&self) -> Option<i32>
Convert the given scalar value into an integer value Read more
source§fn into_string(self) -> Option<String>
fn into_string(self) -> Option<String>
source§fn as_boolean(&self) -> Option<bool>
fn as_boolean(&self) -> Option<bool>
Convert the given scalar value into a boolean value Read more
source§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 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