pub struct FlowValidationOptions {
pub allowed_extensions: Vec<String>,
pub require_schema: bool,
/* private fields */
}Expand description
Options that tweak flow validation behaviour.
Fields§
§allowed_extensions: Vec<String>§require_schema: boolImplementations§
Source§impl FlowValidationOptions
impl FlowValidationOptions
Sourcepub fn with_allowed_extensions<I, S>(self, extensions: I) -> Self
pub fn with_allowed_extensions<I, S>(self, extensions: I) -> Self
Replaces the list of allowed extensions.
Sourcepub fn allow_extension(self, extension: impl Into<String>) -> Self
pub fn allow_extension(self, extension: impl Into<String>) -> Self
Adds one extra extension (case-insensitive) to the allow list.
Sourcepub fn require_schema(self, required: bool) -> Self
pub fn require_schema(self, required: bool) -> Self
Whether a schema definition must be present in every flow.
Sourcepub fn allow_missing_schema(self) -> Self
pub fn allow_missing_schema(self) -> Self
Allows flows to omit a schema definition.
Sourcepub fn add_validator<V>(self, validator: V) -> Selfwhere
V: FlowValidator + 'static,
pub fn add_validator<V>(self, validator: V) -> Selfwhere
V: FlowValidator + 'static,
Registers an additional validator that will run on each flow document.
Sourcepub fn with_validators<I, V>(self, validators: I) -> Selfwhere
I: IntoIterator<Item = V>,
V: FlowValidator + 'static,
pub fn with_validators<I, V>(self, validators: I) -> Selfwhere
I: IntoIterator<Item = V>,
V: FlowValidator + 'static,
Replaces any registered validators with the provided set.
Sourcepub fn validate_flow_folder(
&self,
path: impl AsRef<Path>,
) -> Result<FlowValidationReport>
pub fn validate_flow_folder( &self, path: impl AsRef<Path>, ) -> Result<FlowValidationReport>
Validates all flow documents inside the provided path.
Trait Implementations§
Source§impl Clone for FlowValidationOptions
impl Clone for FlowValidationOptions
Source§impl Debug for FlowValidationOptions
impl Debug for FlowValidationOptions
Auto Trait Implementations§
impl Freeze for FlowValidationOptions
impl !RefUnwindSafe for FlowValidationOptions
impl Send for FlowValidationOptions
impl Sync for FlowValidationOptions
impl Unpin for FlowValidationOptions
impl !UnwindSafe for FlowValidationOptions
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