pub struct GraphQLParserConfig {
pub retain_syntax: bool,
}Expand description
Configuration for GraphQLParser
controlling parser behavior.
All flags default to their full-fidelity values. Set individual
flags to false to discard specific elements for leaner output.
§Example
use libgraphql_parser::GraphQLParserConfig;
// Full-fidelity (default)
let full = GraphQLParserConfig::default();
assert!(full.retain_syntax);
// Lean mode: skip populating syntax structs
let lean = GraphQLParserConfig::lean();
assert!(!lean.retain_syntax);Fields§
§retain_syntax: boolWhether the parser should populate *Syntax structs on AST
nodes with the concrete tokens that make up each construct
(punctuation, keywords, etc.).
When false, all syntax fields on AST nodes remain None,
saving allocations when only semantic data is needed.
Implementations§
Trait Implementations§
Source§impl Clone for GraphQLParserConfig
impl Clone for GraphQLParserConfig
Source§fn clone(&self) -> GraphQLParserConfig
fn clone(&self) -> GraphQLParserConfig
Returns a duplicate of the value. Read more
1.0.0 · 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 GraphQLParserConfig
impl Debug for GraphQLParserConfig
Source§impl Default for GraphQLParserConfig
impl Default for GraphQLParserConfig
Source§impl PartialEq for GraphQLParserConfig
impl PartialEq for GraphQLParserConfig
impl StructuralPartialEq for GraphQLParserConfig
Auto Trait Implementations§
impl Freeze for GraphQLParserConfig
impl RefUnwindSafe for GraphQLParserConfig
impl Send for GraphQLParserConfig
impl Sync for GraphQLParserConfig
impl Unpin for GraphQLParserConfig
impl UnsafeUnpin for GraphQLParserConfig
impl UnwindSafe for GraphQLParserConfig
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