Enum juniper::Type [−][src]
pub enum Type<'a> { Named(Cow<'a, str>), List(Box<Type<'a>>), NonNullNamed(Cow<'a, str>), NonNullList(Box<Type<'a>>), }
Expand description
A type literal in the syntax tree
This enum carries no semantic information and might refer to types that do not exist.
Variants
Expand description
A nullable named type, e.g. String
Expand description
A nullable list type, e.g. [String]
The list itself is what’s nullable, the containing type might be non-null.
Expand description
A non-null named type, e.g. String!
Expand description
A non-null list type, e.g. [String]!
.
The list itself is what’s non-null, the containing type might be null.
Implementations
impl<'a> Type<'a>
[src]
impl<'a> Type<'a>
[src]pub fn name(&self) -> Option<&str>
[src]
pub fn name(&self) -> Option<&str>
[src]Get the name of a named type.
Only applies to named types; lists will return None
.
pub fn innermost_name(&self) -> &str
[src]
pub fn innermost_name(&self) -> &str
[src]Get the innermost name by unpacking lists
All type literals contain exactly one named type.
pub fn is_non_null(&self) -> bool
[src]
pub fn is_non_null(&self) -> bool
[src]Determines if a type only can represent non-null values.
Trait Implementations
impl<'a> Eq for Type<'a>
[src]
impl<'a> StructuralEq for Type<'a>
[src]
impl<'a> StructuralPartialEq for Type<'a>
[src]
Auto Trait Implementations
impl<'a> RefUnwindSafe for Type<'a>
impl<'a> Send for Type<'a>
impl<'a> Sync for Type<'a>
impl<'a> Unpin for Type<'a>
impl<'a> UnwindSafe for Type<'a>
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<Q, K> Equivalent<K> for Q where
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
[src]
impl<Q, K> Equivalent<K> for Q where
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
[src]pub fn equivalent(&self, key: &K) -> bool
[src]
pub fn equivalent(&self, key: &K) -> bool
[src]Compare self to key
and return true
if they are equal.
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn to_owned(&self) -> T
[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
[src]
pub fn clone_into(&self, target: &mut T)
[src]🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,