Skip to main content

BindingError

Enum BindingError 

Source
pub enum BindingError {
Show 29 variants Parse(String), Write(String), MissingEntity(u64), InvalidValue(String), OutOfRange(String), UnsupportedSchema(String), Io(String), UnsupportedProfile(String), FeatureDisabled(&'static str), InvalidModel(String), MissingReference(String), BudgetExceeded(String), Unsupported(String), WrongEntityType(String), TemplateViolation(String), MissingProperty(String), CatalogNotLoaded(String), UnknownAttribute(String), DerivedAttribute(String), MissingAttribute(String), StillReferenced(String), TypeMismatch(String), AmbiguousValue(String), InvalidSelector { detail: String, span: (usize, usize), }, InverseAttribute(String), ExpressMismatch(String), InvalidExpress(String), HistoryEmpty(String), HistoryStale(String),
}
Expand description

Why a binding call failed.

Variants§

§

Parse(String)

The STEP input could not be parsed.

§

Write(String)

The model could not be serialized.

§

MissingEntity(u64)

No entity has the given id.

§

InvalidValue(String)

A host value did not follow the tagged value encoding.

§

OutOfRange(String)

An id or index was outside the range the model can represent.

§

UnsupportedSchema(String)

The file’s header names no schema this crate bundles, or (from a domain view, #123) a release the view is not verified for, such as IFC4X1 for property sets or georeferencing.

§

Io(String)

A file could not be opened or read.

§

UnsupportedProfile(String)

No ifcXML XSD profile is named by the given token (only IFC4 and IFC4X3_ADD2 have one).

§

FeatureDisabled(&'static str)

The operation needs a binding feature this build left out, e.g. validate in a size-trimmed browser package.

§

InvalidModel(String)

A domain view (#123) refused the file’s data: it contradicts the schema, is ambiguous where the schema allows one answer, or cannot prove an exact answer (a lenient read’s skipped records). Or an authoring batch (#330) would leave the model contradicting the schema: a second IfcProject, or an object contained, aggregated or typed twice.

§

MissingReference(String)

A domain view (#123) followed a reference to an entity the file does not contain.

§

BudgetExceeded(String)

A domain view (#123) stopped at its traversal budget: a cycle, or nesting deeper than it follows.

§

Unsupported(String)

A domain view (#123) met a construct it does not interpret, such as a coordinate operation with no project-to-map form; refused rather than approximated.

§

WrongEntityType(String)

A domain query (#123) named an entity of a type the query does not accept, such as the property sets of a cartesian point; or a property edit named a set type the set does not have.

§

TemplateViolation(String)

A property edit (#123) wrote a value its template refuses: the release’s PSD/QTO catalog entry for the set (data type, enumeration, form, quantity kind, a property it does not declare), or the property’s own IfcPropertyEnumeration.

§

MissingProperty(String)

A property edit (#123) removed a property the object does not state, including one it only inherits from its type object.

§

CatalogNotLoaded(String)

A property edit wrote to a Pset_/Qto_ set before the release’s PSD/QTO catalog was loaded, in a build that loads it at runtime (property-catalog-runtime, #318). Load it and retry.

§

UnknownAttribute(String)

A by-name attribute access (#326) named no attribute of the entity’s type in the declared release: neither an explicit one nor, for a read, an INVERSE one (#462).

§

DerivedAttribute(String)

A by-name attribute write (#326) named a slot the entity’s type derives: the file writes it * and it holds no value to set.

§

MissingAttribute(String)

An authoring batch (#330) left a required attribute of the declared release unset, such as IFC2X3’s OwnerHistory.

§

StillReferenced(String)

An authoring batch (#330) removed an entity that an entity other than a relationship still references; remove or edit that first.

§

TypeMismatch(String)

A plain host value written by name (#342) does not fit the attribute’s declared type in the declared release: a string for an integer, a name no enumeration item has, a reference to an entity of a type the attribute does not accept.

§

AmbiguousValue(String)

A plain host value written by name (#342) fits more than one member of the attribute’s SELECT, such as a string for IfcValue; the detail names the candidates. Wrap the value explicitly instead.

§

InvalidSelector

A selector or value path (#464) does not follow the grammar, or names a class or attribute the declared release does not declare.

Fields

§detail: String

What is wrong.

§span: (usize, usize)

The byte range of the offending text in the UTF-8 query.

§

InverseAttribute(String)

A by-name attribute write (#462) named an INVERSE attribute of the entity’s type: it holds no slot; write the referencing attribute.

§

ExpressMismatch(String)

EXPRESS rule text (#538) that does not fit the model’s declared release: it declares another schema, or disagrees with the release’s tables about an entity’s attributes.

§

InvalidExpress(String)

EXPRESS rule text (#538) that does not parse, or whose rules use a name that binds to nothing.

§

HistoryEmpty(String)

An undo or redo (#465) with nothing to step through: history is off (limit 0), or that stack is empty.

§

HistoryStale(String)

An undo or redo (#465) after the model changed outside the history; the held entries no longer describe it, so nothing was changed.

Implementations§

Source§

impl BindingError

Source

pub const fn code(&self) -> &'static str

Stable code for programmatic handling.

Source

pub const fn span(&self) -> Option<(usize, usize)>

The byte range in the query an invalid-selector refusal names.

Trait Implementations§

Source§

impl Clone for BindingError

Source§

fn clone(&self) -> BindingError

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 Debug for BindingError

Source§

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

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

impl Display for BindingError

Source§

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

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

impl Eq for BindingError

Source§

impl Error for BindingError

1.30.0 · Source§

fn source(&self) -> Option<&(dyn Error + 'static)>

Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§

fn description(&self) -> &str

👎Deprecated since 1.42.0:

use the Display impl or to_string()

1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
Source§

impl From<&BindingError> for PropertyRefusal

Source§

fn from(error: &BindingError) -> Self

Converts to this type from the input type.
Source§

impl PartialEq for BindingError

Source§

fn eq(&self, other: &BindingError) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for BindingError

Auto Trait Implementations§

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
§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
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> Same for T

Source§

type Output = T

Should always be Self
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> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. 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.