Struct wasmer_api::backend::gql::Id
source · #[repr(transparent)]pub struct Id(_);Expand description
A GraphQL ID
Any field in a GraphQL schema that has the type ID should be represented
by this struct.
Implementations§
source§impl Id
impl Id
sourcepub fn new(s: impl Into<String>) -> Id
pub fn new(s: impl Into<String>) -> Id
Constructs an ID from a String, &str or similar
cynic::Id::new("123");sourcepub fn into_inner(self) -> String
pub fn into_inner(self) -> String
Converts this Id into its inner value
sourcepub fn from_ref(s: &String) -> &Id
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§
source§impl<'de> Deserialize<'de> for Id
impl<'de> Deserialize<'de> for Id
source§fn deserialize<__D>(
__deserializer: __D
) -> Result<Id, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
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
source§impl Serialize for Id
impl Serialize for Id
source§fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
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
impl CoercesTo<Id> for Id
impl CoercesTo<Id> for str
impl CoercesTo<Option<Id>> for Id
impl CoercesTo<Option<Option<Id>>> for Id
impl CoercesTo<Option<Vec<Id, Global>>> for Id
impl CoercesTo<Option<Vec<Option<Id>, Global>>> for Id
impl CoercesTo<Vec<Id, Global>> for Id
impl CoercesTo<Vec<Vec<Id, Global>, Global>> for Id
impl Eq for Id
impl StructuralEq for Id
impl StructuralPartialEq for Id
Auto Trait Implementations§
impl RefUnwindSafe for Id
impl Send for Id
impl Sync for Id
impl Unpin for Id
impl UnwindSafe for Id
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
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.§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,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§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,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.