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
sourceimpl<T: Clone + Num + Display> Clone for StringNumber<T>
impl<T: Clone + Num + Display> Clone for StringNumber<T>
sourcefn clone(&self) -> StringNumber<T>
fn clone(&self) -> StringNumber<T>
Returns a copy of the value. Read more
1.0.0 · sourceconst fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl<'de, T: Num + Display> Deserialize<'de> for StringNumber<T>where
T: Deserialize<'de>,
impl<'de, T: Num + Display> Deserialize<'de> for StringNumber<T>where
T: Deserialize<'de>,
sourcefn 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
sourceimpl<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
sourcefn 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.
sourcefn parse(value: Option<Value>) -> InputValueResult<Self>
fn parse(value: Option<Value>) -> InputValueResult<Self>
Parse from
Value
. None represents undefined.sourcefn as_raw_value(&self) -> Option<&Self::RawValueType>
fn as_raw_value(&self) -> Option<&Self::RawValueType>
Returns a reference to the raw value.
sourcefn qualified_type_name() -> String
fn qualified_type_name() -> String
Qualified typename.
sourceimpl<T: Ord + Num + Display> Ord for StringNumber<T>
impl<T: Ord + Num + Display> Ord for StringNumber<T>
sourcefn cmp(&self, other: &StringNumber<T>) -> Ordering
fn cmp(&self, other: &StringNumber<T>) -> Ordering
1.21.0 · sourceconst fn max(self, other: Self) -> Self
const fn max(self, other: Self) -> Self
Compares and returns the maximum of two values. Read more
1.21.0 · sourceconst fn min(self, other: Self) -> Self
const fn min(self, other: Self) -> Self
Compares and returns the minimum of two values. Read more
1.50.0 · sourceconst fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: PartialOrd<Self>,
const fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: PartialOrd<Self>,
Restrict a value to a certain interval. Read more
sourceimpl<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,
sourcefn 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.
sourcefn 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
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: '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
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait,
Resolve an output value to
async_graphql::Value
.sourcefn qualified_type_name() -> String
fn qualified_type_name() -> String
Qualified typename.
sourcefn introspection_type_name(&self) -> Cow<'static, str>
fn introspection_type_name(&self) -> Cow<'static, str>
Introspection type name Read more
sourceimpl<T: PartialEq + Num + Display> PartialEq<StringNumber<T>> for StringNumber<T>
impl<T: PartialEq + Num + Display> PartialEq<StringNumber<T>> for StringNumber<T>
sourcefn eq(&self, other: &StringNumber<T>) -> bool
fn eq(&self, other: &StringNumber<T>) -> bool
sourceimpl<T: PartialOrd + Num + Display> PartialOrd<StringNumber<T>> for StringNumber<T>
impl<T: PartialOrd + Num + Display> PartialOrd<StringNumber<T>> for StringNumber<T>
sourcefn partial_cmp(&self, other: &StringNumber<T>) -> Option<Ordering>
fn partial_cmp(&self, other: &StringNumber<T>) -> Option<Ordering>
1.0.0 · sourceconst fn le(&self, other: &Rhs) -> bool
const 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 moresourceimpl<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
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<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,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.