Struct apollo_encoder::Field
source · [−]pub struct Field { /* private fields */ }
Expand description
The __Field type represents each field in an Object or Interface type.
Field: Alias? Name Arguments? Directives? SelectionSet?
Detailed documentation can be found in GraphQL spec.
Example
use apollo_encoder::Field;
let mut field = Field::new("myField".to_string());
field.alias(Some("myAlias".to_string()));
assert_eq!(field.to_string(), r#"myAlias: myField"#);
Implementations
sourceimpl Field
impl Field
sourcepub fn selection_set(&mut self, selection_set: Option<SelectionSet>)
pub fn selection_set(&mut self, selection_set: Option<SelectionSet>)
Set a selection set to a field
Trait Implementations
impl StructuralPartialEq for Field
Auto Trait Implementations
impl RefUnwindSafe for Field
impl Send for Field
impl Sync for Field
impl Unpin for Field
impl UnwindSafe for Field
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more