Skip to main content

ValidateOptions

Struct ValidateOptions 

Source
#[non_exhaustive]
pub struct ValidateOptions<'a> { pub budget: Budget, pub express: Option<&'a ExpressRules>, pub catalog: Option<&'a dyn PropertySetCatalog>, pub inverse_cardinality: bool, }
Expand description

Everything a validation run may be given besides the model and its tables.

use ifc_validate::{validate_with_options, Budget, ValidateOptions};
let options = ValidateOptions::new().budget(Budget { max_findings: 100 });
let report = validate_with_options(model, ifc_schema::ifc4(), &options);

Fields (Non-exhaustive)§

This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.
§budget: Budget

How many findings to record.

§express: Option<&'a ExpressRules>

The release’s EXPRESS rules, read from its schema text. With them, every WHERE rule, type rule and global rule is evaluated, and the hand-written rules they cover are not run.

§catalog: Option<&'a dyn PropertySetCatalog>

The PSD/QTO catalog that Pset_ and Qto_ set names are checked against.

§inverse_cardinality: bool

Check every INVERSE clause’s cardinality (structure.inverse.cardinality). Off unless asked for, or unless EXPRESS rules are supplied: it is part of full EXPRESS conformance, and IFC2X3’s PlacesObject : SET [1:1] alone turns many files that share a placement between products non-conformant.

Implementations§

Source§

impl<'a> ValidateOptions<'a>

Source

pub fn new() -> Self

The default budget, no EXPRESS rules, no catalog: what validate runs.

Source

pub fn budget(self, budget: Budget) -> Self

These options with another finding budget.

Source

pub fn express(self, rules: &'a ExpressRules) -> Self

These options evaluating rules, and checking INVERSE cardinality with them.

Source

pub fn inverse_cardinality(self, check: bool) -> Self

These options with INVERSE cardinality checked, or not.

Source

pub fn catalog(self, catalog: &'a dyn PropertySetCatalog) -> Self

These options checking set names against catalog.

Trait Implementations§

Source§

impl<'a> Clone for ValidateOptions<'a>

Source§

fn clone(&self) -> ValidateOptions<'a>

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<'a> Copy for ValidateOptions<'a>

Source§

impl Debug for ValidateOptions<'_>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'a> Default for ValidateOptions<'a>

Source§

fn default() -> ValidateOptions<'a>

Returns the “default value” for a type. Read more

Auto Trait Implementations§

§

impl<'a> !RefUnwindSafe for ValidateOptions<'a>

§

impl<'a> !Send for ValidateOptions<'a>

§

impl<'a> !Sync for ValidateOptions<'a>

§

impl<'a> !UnwindSafe for ValidateOptions<'a>

§

impl<'a> Freeze for ValidateOptions<'a>

§

impl<'a> Unpin for ValidateOptions<'a>

§

impl<'a> UnsafeUnpin for ValidateOptions<'a>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.