Struct async_graphql::types::StringNumber
source · Available on crate feature
string_number
only.Expand description
A numeric value represented by a string.
Tuple Fields§
§0: T
Trait Implementations§
source§impl<T: Clone + Num + Display> Clone for StringNumber<T>
impl<T: Clone + Num + Display> Clone for StringNumber<T>
source§fn clone(&self) -> StringNumber<T>
fn clone(&self) -> StringNumber<T>
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<'de, T> Deserialize<'de> for StringNumber<T>where
T: Deserialize<'de> + Num + Display,
impl<'de, T> Deserialize<'de> for StringNumber<T>where
T: Deserialize<'de> + Num + Display,
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl<T: Num + Display + Send + Sync> InputType for StringNumber<T>where
<T as Num>::FromStrRadixErr: Display,
impl<T: Num + Display + Send + Sync> InputType for StringNumber<T>where
<T as Num>::FromStrRadixErr: Display,
§type RawValueType = StringNumber<T>
type RawValueType = StringNumber<T>
The raw type used for validator. Read more
source§fn create_type_info(registry: &mut Registry) -> String
fn create_type_info(registry: &mut Registry) -> String
Create type information in the registry and return qualified typename.
source§fn parse(value: Option<Value>) -> InputValueResult<Self>
fn parse(value: Option<Value>) -> InputValueResult<Self>
Parse from
Value
. None represents undefined.source§fn as_raw_value(&self) -> Option<&Self::RawValueType>
fn as_raw_value(&self) -> Option<&Self::RawValueType>
Returns a reference to the raw value.
source§fn qualified_type_name() -> String
fn qualified_type_name() -> String
Qualified typename.
source§impl<T: Ord + Num + Display> Ord for StringNumber<T>
impl<T: Ord + Num + Display> Ord for StringNumber<T>
source§fn cmp(&self, other: &StringNumber<T>) -> Ordering
fn cmp(&self, other: &StringNumber<T>) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl<T: Num + Display + Send + Sync> OutputType for StringNumber<T>where
<T as Num>::FromStrRadixErr: Display,
impl<T: Num + Display + Send + Sync> OutputType for StringNumber<T>where
<T as Num>::FromStrRadixErr: Display,
source§fn create_type_info(registry: &mut Registry) -> String
fn create_type_info(registry: &mut Registry) -> String
Create type information in the registry and return qualified typename.
source§fn resolve<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
__arg1: &'life1 ContextSelectionSet<'life2>,
_field: &'life3 Positioned<Field>
) -> Pin<Box<dyn Future<Output = ServerResult<Value>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn resolve<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
__arg1: &'life1 ContextSelectionSet<'life2>,
_field: &'life3 Positioned<Field>
) -> Pin<Box<dyn Future<Output = ServerResult<Value>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Resolve an output value to
async_graphql::Value
.source§fn qualified_type_name() -> String
fn qualified_type_name() -> String
Qualified typename.
source§impl<T: PartialEq + Num + Display> PartialEq<StringNumber<T>> for StringNumber<T>
impl<T: PartialEq + Num + Display> PartialEq<StringNumber<T>> for StringNumber<T>
source§fn eq(&self, other: &StringNumber<T>) -> bool
fn eq(&self, other: &StringNumber<T>) -> bool
source§impl<T: PartialOrd + Num + Display> PartialOrd<StringNumber<T>> for StringNumber<T>
impl<T: PartialOrd + Num + Display> PartialOrd<StringNumber<T>> for StringNumber<T>
source§fn partial_cmp(&self, other: &StringNumber<T>) -> Option<Ordering>
fn partial_cmp(&self, other: &StringNumber<T>) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl<T: Num + Display + Send + Sync> ScalarType for StringNumber<T>where
<T as Num>::FromStrRadixErr: Display,
impl<T: Num + Display + Send + Sync> ScalarType for StringNumber<T>where
<T as Num>::FromStrRadixErr: Display,
impl<T: Eq + Num + Display> Eq for StringNumber<T>
impl<T: Num + Display> StructuralEq for StringNumber<T>
impl<T: Num + Display> StructuralPartialEq for StringNumber<T>
Auto Trait Implementations§
impl<T> RefUnwindSafe for StringNumber<T>where
T: RefUnwindSafe,
impl<T> Send for StringNumber<T>where
T: Send,
impl<T> Sync for StringNumber<T>where
T: Sync,
impl<T> Unpin for StringNumber<T>where
T: Unpin,
impl<T> UnwindSafe for StringNumber<T>where
T: UnwindSafe,
Blanket Implementations§
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.