#[non_exhaustive]pub enum TeiError {
Empty,
LegacyUrn,
Scheme,
Structure,
Domain,
Type,
Identifier,
PercentEncoding,
#[non_exhaustive] Registry {
tei_type: String,
reason: String,
},
}Expand description
Failure while parsing or validating a Transparency Exchange Identifier.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Empty
The input was empty.
LegacyUrn
The input used the legacy urn:tei: form, which this crate does not parse.
Scheme
The scheme was not the exact lowercase string tei.
Structure
The TEI did not have the form tei://domain/type/identifier.
Domain
A domain name was missing or not an ASCII DNS name.
Type
The type segment was not lowercase ASCII starting with a letter.
Identifier
The unique-identifier segment was empty or contained a slash.
PercentEncoding
A percent-escape was truncated or not hexadecimal.
#[non_exhaustive]Registry
The identifier failed the registered type’s syntax.
Fields
This variant is marked as non-exhaustive
Non-exhaustive enum variants could have additional fields added in future. Therefore, non-exhaustive enum variants cannot be constructed in external crates and cannot be matched against.
Trait Implementations§
impl Eq for TeiError
Source§impl Error for TeiError
impl Error for TeiError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
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
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
impl StructuralPartialEq for TeiError
Auto Trait Implementations§
impl Forget for TeiError
impl Freeze for TeiError
impl RefUnwindSafe for TeiError
impl Send for TeiError
impl Sync for TeiError
impl Unpin for TeiError
impl UnsafeUnpin for TeiError
impl UnwindSafe for TeiError
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