pub enum Error {
DuplicatedSecurityDefinition(String),
MissingOpInForm,
InvalidOpInForm {
context: FormContext,
operation: FormOperation,
},
UndefinedSecurity(String),
InvalidMinMax,
NanMinMax,
DuplicatedAffordance {
ty: AffordanceType,
name: String,
},
InvalidMultipleOf,
MissingSchemaDefinition(String),
InvalidUriVariables,
InvalidLanguageTag(String),
SizesWithRelNotIcon,
}Expand description
Builder errors
Most of the Thing Description conflicts are caught at compile time. The few errors that may be discovered at only runtime are the following.
Variants§
DuplicatedSecurityDefinition(String)
The WoT security definitions must have an unique name
MissingOpInForm
The forms have defaults that depend on the Affordance that contains them. The Thing-level forms must be explicit on the operation
InvalidOpInForm
The Form can use only a specific set of operations depending on the context.
Fields
context: FormContextThe context of the invalid operation.
operation: FormOperationThe invalid operation for the Form.
UndefinedSecurity(String)
The security field must refer to existing security definitions.
InvalidMinMax
When both min and max are specified, min must be less or equal than max
NanMinMax
Neither minimum or maximum value can be NaN
DuplicatedAffordance
For each type of affordance, names must be unique
InvalidMultipleOf
Invalid multiple_of field, that must strictly greater than zero.
MissingSchemaDefinition(String)
A schema has been referenced using a specific name, but it is not been declared.
InvalidUriVariables
Invalid URI variable, which cannot be an object or an array.
InvalidLanguageTag(String)
Language tag is not conforming to BCP47.
SizesWithRelNotIcon
A Link contains a sizes field but its rel field is not equal to icon.
Trait Implementations§
Source§impl Error for Error
impl Error for Error
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
impl Eq for Error
impl StructuralPartialEq for Error
Auto Trait Implementations§
impl Freeze for Error
impl RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnwindSafe for Error
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.