pub struct DirectiveRegistry { /* private fields */ }Expand description
Registry for managing directive validators
Implementations§
Source§impl DirectiveRegistry
impl DirectiveRegistry
Sourcepub fn with_builtin_validators() -> Self
pub fn with_builtin_validators() -> Self
Creates a registry with built-in validators
Sourcepub fn register_validator(&mut self, validator: Box<dyn DirectiveValidator>)
pub fn register_validator(&mut self, validator: Box<dyn DirectiveValidator>)
Registers a directive validator
Sourcepub fn register_builtin_validators(&mut self)
pub fn register_builtin_validators(&mut self)
Registers all built-in validators
Sourcepub fn validate_directive(
&self,
directive: &ParsedDirective,
) -> DirectiveValidationResult
pub fn validate_directive( &self, directive: &ParsedDirective, ) -> DirectiveValidationResult
Validates a directive
Sourcepub fn get_directive_suggestions(
&self,
directive: &ParsedDirective,
) -> Vec<String>
pub fn get_directive_suggestions( &self, directive: &ParsedDirective, ) -> Vec<String>
Gets suggestions for a directive
Sourcepub fn get_registered_directives(&self) -> Vec<String>
pub fn get_registered_directives(&self) -> Vec<String>
Returns all registered directive names
Sourcepub fn is_directive_registered(&self, name: &str) -> bool
pub fn is_directive_registered(&self, name: &str) -> bool
Checks if a directive is registered
Trait Implementations§
Source§impl Default for DirectiveRegistry
impl Default for DirectiveRegistry
Source§fn default() -> DirectiveRegistry
fn default() -> DirectiveRegistry
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for DirectiveRegistry
impl !RefUnwindSafe for DirectiveRegistry
impl Send for DirectiveRegistry
impl Sync for DirectiveRegistry
impl Unpin for DirectiveRegistry
impl !UnwindSafe for DirectiveRegistry
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more