#[non_exhaustive]pub enum DirectiveResult {
Include,
Skip,
Transform(Value),
Error(String),
}Expand description
Result of custom directive evaluation.
Determines how a field should be handled after directive processing.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Include
Include the field in the response (default behavior).
Skip
Skip the field entirely (like @skip(if: true)).
Transform(Value)
Transform the field value before returning. The transformation is applied after field resolution.
Error(String)
Directive encountered an error that should be reported.
Trait Implementations§
Source§impl Clone for DirectiveResult
impl Clone for DirectiveResult
Source§fn clone(&self) -> DirectiveResult
fn clone(&self) -> DirectiveResult
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DirectiveResult
impl Debug for DirectiveResult
Source§impl Default for DirectiveResult
impl Default for DirectiveResult
Source§fn default() -> DirectiveResult
fn default() -> DirectiveResult
Returns the “default value” for a type. Read more
impl Eq for DirectiveResult
Source§impl PartialEq for DirectiveResult
impl PartialEq for DirectiveResult
Source§fn eq(&self, other: &DirectiveResult) -> bool
fn eq(&self, other: &DirectiveResult) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for DirectiveResult
Auto Trait Implementations§
impl Freeze for DirectiveResult
impl RefUnwindSafe for DirectiveResult
impl Send for DirectiveResult
impl Sync for DirectiveResult
impl Unpin for DirectiveResult
impl UnsafeUnpin for DirectiveResult
impl UnwindSafe for DirectiveResult
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.