pub enum TypeReference {
Value(ValueTypeTag),
Schema(Label),
}Expand description
A type reference used by a function signature.
Variants§
Value(ValueTypeTag)
One of the closed built-in scalar value types.
Schema(Label)
A schema type or struct label resolved against the declared graph.
Implementations§
Source§impl TypeReference
impl TypeReference
Sourcepub fn from_token(value: impl Into<String>) -> Result<Self, Diagnostic>
pub fn from_token(value: impl Into<String>) -> Result<Self, Diagnostic>
Parse the unambiguous TypeQL type-position spelling.
Sourcepub const fn schema_label(&self) -> Option<&Label>
pub const fn schema_label(&self) -> Option<&Label>
Return the referenced schema label, if this is not a built-in value type.
Trait Implementations§
Source§impl Clone for TypeReference
impl Clone for TypeReference
Source§impl Debug for TypeReference
impl Debug for TypeReference
impl Eq for TypeReference
Source§impl Ord for TypeReference
impl Ord for TypeReference
1.21.0 (const: unstable) · 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
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialEq for TypeReference
impl PartialEq for TypeReference
Source§impl PartialOrd for TypeReference
impl PartialOrd for TypeReference
Source§impl Serialize for TypeReference
impl Serialize for TypeReference
impl StructuralPartialEq for TypeReference
Auto Trait Implementations§
impl Freeze for TypeReference
impl RefUnwindSafe for TypeReference
impl Send for TypeReference
impl Sync for TypeReference
impl Unpin for TypeReference
impl UnsafeUnpin for TypeReference
impl UnwindSafe for TypeReference
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