sui_graphql_client::query_types::schema

Type Alias ID

Source
pub type ID = Id;

Aliased Type§

struct ID(/* private fields */);

Implementations

§

impl Id

pub fn new(s: impl Into<String>) -> Id

Constructs an ID from a String, &str or similar

cynic::Id::new("123");

pub fn inner(&self) -> &str

Returns a reference to the value of this Id

pub fn into_inner(self) -> String

Converts this Id into its inner value

pub fn from_ref(s: &String) -> &Id

Converts a reference to a String to a reference to an Id

To be used when you can access an &String which you want to assume is an Id for use in Cynic structures without reallocating

If you don’t have a String at hand but only an &str, you should know that these can be used directly in InputObjects as well when the target GraphQL type is an Id.

Trait Implementations

§

impl Clone for Id

§

fn clone(&self) -> Id

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl Debug for Id

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl<'de> Deserialize<'de> for Id

§

fn deserialize<__D>( __deserializer: __D, ) -> Result<Id, <__D as Deserializer<'de>>::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
§

impl<T> From<T> for Id
where T: Into<String>,

§

fn from(s: T) -> Id

Converts to this type from the input type.
§

impl Hash for Id

§

fn hash<__H>(&self, state: &mut __H)
where __H: Hasher,

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
§

impl IsScalar<Id> for Id

§

type SchemaType = Id

The schema marker type this scalar represents.
§

impl NamedType for Id

§

const NAME: &'static str = "ID"

The name of this type
§

impl PartialEq for Id

§

fn eq(&self, other: &Id) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
§

impl RefCast for Id

§

type From = String

§

fn ref_cast(_from: &<Id as RefCast>::From) -> &Id

§

fn ref_cast_mut(_from: &mut <Id as RefCast>::From) -> &mut Id

§

impl Serialize for Id

§

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
Source§

impl Variable for Id

Source§

const TYPE: VariableType

§

impl CoercesTo<Id> for Id

§

impl CoercesTo<Option<Id>> for Id

§

impl CoercesTo<Option<Option<Id>>> for Id

§

impl CoercesTo<Option<Vec<Id>>> for Id

§

impl CoercesTo<Option<Vec<Option<Id>>>> for Id

§

impl CoercesTo<Vec<Id>> for Id

§

impl CoercesTo<Vec<Vec<Id>>> for Id

§

impl Eq for Id

§

impl StructuralPartialEq for Id