pub struct ValidatorConfig {
pub max_steps: Option<usize>,
pub rdf_data: Option<RdfDataConfig>,
pub shex: Option<ShExConfig>,
pub shapemap: Option<ShapemapConfig>,
pub check_negation_requirement: Option<bool>,
pub width: Option<usize>,
pub external_resolvers: ExternalShapeResolverRegistry,
}Expand description
This struct can be used to customize the behavour of ShEx validators
Fields§
§max_steps: Option<usize>Maximum numbers of validation steps
rdf_data: Option<RdfDataConfig>Configuration of RDF data readers
shex: Option<ShExConfig>Configuration of ShEx schemas
shapemap: Option<ShapemapConfig>Configuration of Shapemaps
check_negation_requirement: Option<bool>Whether to check the negation requirement (default: true)
width: Option<usize>Width for pretty printing
external_resolvers: ExternalShapeResolverRegistryResolvers consulted for EXTERNAL shape expressions. Defaults to a
registry containing only RejectAllExternalResolver. Resolvers cannot
be loaded from TOML — they must be installed programmatically via
Self::with_external_resolver.
Implementations§
Source§impl ValidatorConfig
impl ValidatorConfig
Sourcepub fn from_path<P: AsRef<Path>>(
path: P,
) -> Result<ValidatorConfig, ValidatorError>
pub fn from_path<P: AsRef<Path>>( path: P, ) -> Result<ValidatorConfig, ValidatorError>
Obtain a ValidatorConfig from a path file in TOML format
pub fn set_max_steps(&mut self, max_steps: usize)
pub fn max_steps(&self) -> usize
pub fn rdf_data_config(&self) -> RdfDataConfig
pub fn shex_config(&self) -> ShExConfig
pub fn shapemap_config(&self) -> ShapemapConfig
pub fn width(&self) -> usize
pub fn set_check_negation_requirement(&mut self, check: bool)
pub fn external_resolvers(&self) -> &ExternalShapeResolverRegistry
Sourcepub fn with_external_resolver<R: ExternalShapeResolver + 'static>(
self,
r: R,
) -> Self
pub fn with_external_resolver<R: ExternalShapeResolver + 'static>( self, r: R, ) -> Self
Prepend a resolver to the EXTERNAL-shape resolver chain. Returns the updated config for builder-style chaining.
pub fn with_external_resolver_arc( self, r: Arc<dyn ExternalShapeResolver>, ) -> Self
Trait Implementations§
Source§impl Clone for ValidatorConfig
impl Clone for ValidatorConfig
Source§fn clone(&self) -> ValidatorConfig
fn clone(&self) -> ValidatorConfig
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 ValidatorConfig
impl Debug for ValidatorConfig
Source§impl Default for ValidatorConfig
impl Default for ValidatorConfig
Source§impl<'de> Deserialize<'de> for ValidatorConfig
impl<'de> Deserialize<'de> for ValidatorConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl !RefUnwindSafe for ValidatorConfig
impl !UnwindSafe for ValidatorConfig
impl Freeze for ValidatorConfig
impl Send for ValidatorConfig
impl Sync for ValidatorConfig
impl Unpin for ValidatorConfig
impl UnsafeUnpin for ValidatorConfig
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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