pub struct Arguments<'a, S = DefaultScalarValue> { /* private fields */ }
Expand description
Field argument container
Implementations§
Source§impl<'a, S> Arguments<'a, S>
impl<'a, S> Arguments<'a, S>
Sourcepub fn get<T>(&self, name: &str) -> FieldResult<Option<T>, S>
pub fn get<T>(&self, name: &str) -> FieldResult<Option<T>, S>
Gets an argument by the given name
and converts it into the desired
type.
If the argument is found, or a default argument has been provided, the
given InputValue
will be converted into the type T
.
Returns None
if an argument with such name
is not present.
§Errors
If the FromInputValue
conversion fails.
Sourcepub fn get_input_value(&self, name: &str) -> Option<&Spanning<InputValue<S>>>
pub fn get_input_value(&self, name: &str) -> Option<&Spanning<InputValue<S>>>
Gets a direct reference to the Spanning
argument InputValue
.
Trait Implementations§
Auto Trait Implementations§
impl<'a, S> Freeze for Arguments<'a, S>
impl<'a, S> RefUnwindSafe for Arguments<'a, S>where
S: RefUnwindSafe,
impl<'a, S> Send for Arguments<'a, S>where
S: Send,
impl<'a, S> Sync for Arguments<'a, S>where
S: Sync,
impl<'a, S> Unpin for Arguments<'a, S>where
S: Unpin,
impl<'a, S> UnwindSafe for Arguments<'a, S>where
S: UnwindSafe,
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