pub struct GraphqlStats {
pub max_depth: u32,
pub aliases: u32,
pub fields: u32,
pub directives: u32,
pub has_introspection: bool,
}Expand description
Structural metrics of one GraphQL query/operation text.
Fields§
§max_depth: u32Maximum selection-set nesting depth (paren-aware: input-object braces excluded).
aliases: u32Alias separators (alias: field) — a : in selection-set context. The
“alias bomb” DoS signal.
fields: u32Field/selection name tokens in selection-set context. A cheap complexity proxy.
directives: u32@directive occurrences.
has_introspection: boolA schema-introspection meta-field (__schema / __type) is present. NB:
__typename is deliberately NOT counted (it is benign and ubiquitous).
Trait Implementations§
Source§impl Clone for GraphqlStats
impl Clone for GraphqlStats
Source§fn clone(&self) -> GraphqlStats
fn clone(&self) -> GraphqlStats
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 moreimpl Copy for GraphqlStats
Source§impl Debug for GraphqlStats
impl Debug for GraphqlStats
Source§impl Default for GraphqlStats
impl Default for GraphqlStats
Source§fn default() -> GraphqlStats
fn default() -> GraphqlStats
Returns the “default value” for a type. Read more
impl Eq for GraphqlStats
Source§impl PartialEq for GraphqlStats
impl PartialEq for GraphqlStats
Source§fn eq(&self, other: &GraphqlStats) -> bool
fn eq(&self, other: &GraphqlStats) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for GraphqlStats
Auto Trait Implementations§
impl Freeze for GraphqlStats
impl RefUnwindSafe for GraphqlStats
impl Send for GraphqlStats
impl Sync for GraphqlStats
impl Unpin for GraphqlStats
impl UnsafeUnpin for GraphqlStats
impl UnwindSafe for GraphqlStats
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