pub struct RelayNodeID<T: RelayNode + ?Sized>(/* private fields */);
Expand description
RelayNodeID is a wrapper around a UUID with the use of the ‘RelayNodeStruct’ trait to ensure each object has a globally unique ID.
Implementations§
Source§impl<T: RelayNode> RelayNodeID<T>
impl<T: RelayNode> RelayNodeID<T>
Sourcepub fn new(uuid: Uuid) -> Self
pub fn new(uuid: Uuid) -> Self
new creates a new RelayNodeID from a UUID string and a type specified as a generic.
Sourcepub fn new_from_relay_id(relay_id: String) -> Result<Self, Error>
pub fn new_from_relay_id(relay_id: String) -> Result<Self, Error>
new_from_relay_id takes in a generic relay ID and converts it into a RelayNodeID.
Sourcepub fn new_from_str(uuid: &str) -> Result<Self, Error>
pub fn new_from_str(uuid: &str) -> Result<Self, Error>
new_from_str is a wrapper around ‘Uuid::from_str’ to create a new RelayNodeID from a UUIDv4 string.
Trait Implementations§
Source§impl<T: Clone + RelayNode + ?Sized> Clone for RelayNodeID<T>
impl<T: Clone + RelayNode + ?Sized> Clone for RelayNodeID<T>
Source§fn clone(&self) -> RelayNodeID<T>
fn clone(&self) -> RelayNodeID<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<T: RelayNode> Debug for RelayNodeID<T>
impl<T: RelayNode> Debug for RelayNodeID<T>
Source§impl<T: RelayNode> From<&RelayNodeID<T>> for String
impl<T: RelayNode> From<&RelayNodeID<T>> for String
Source§fn from(id: &RelayNodeID<T>) -> Self
fn from(id: &RelayNodeID<T>) -> Self
Converts to this type from the input type.
Source§impl<T: RelayNode + Send + Sync> InputType for RelayNodeID<T>
impl<T: RelayNode + Send + Sync> InputType for RelayNodeID<T>
Source§type RawValueType = RelayNodeID<T>
type RawValueType = RelayNodeID<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: RelayNode + Send + Sync> OutputType for RelayNodeID<T>
impl<T: RelayNode + Send + Sync> OutputType for RelayNodeID<T>
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,
_: &'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,
_: &'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: RelayNode + Send + Sync> ScalarType for RelayNodeID<T>
impl<T: RelayNode + Send + Sync> ScalarType for RelayNodeID<T>
Source§impl<T: RelayNode> ToString for RelayNodeID<T>
impl<T: RelayNode> ToString for RelayNodeID<T>
impl<T: Eq + RelayNode + ?Sized> Eq for RelayNodeID<T>
impl<T: RelayNode + ?Sized> StructuralPartialEq for RelayNodeID<T>
Auto Trait Implementations§
impl<T> Freeze for RelayNodeID<T>where
T: ?Sized,
impl<T> RefUnwindSafe for RelayNodeID<T>where
T: RefUnwindSafe + ?Sized,
impl<T> Send for RelayNodeID<T>
impl<T> Sync for RelayNodeID<T>
impl<T> Unpin for RelayNodeID<T>
impl<T> UnwindSafe for RelayNodeID<T>where
T: UnwindSafe + ?Sized,
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<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.