pub enum UriTemplateError {
Show 24 variants
SourceTooLong {
actual: usize,
maximum: usize,
},
TooManyParts {
maximum: usize,
},
TooManyExpressions {
maximum: usize,
},
TooManyVariables {
maximum: usize,
},
VariableNameTooLong {
actual: usize,
maximum: usize,
},
InvalidLiteral {
offset: usize,
},
UnclosedExpression {
offset: usize,
},
NestedExpression {
offset: usize,
},
UnexpectedCloseBrace {
offset: usize,
},
EmptyExpression {
offset: usize,
},
UnsupportedOperator {
operator: char,
offset: usize,
},
InvalidVariable {
offset: usize,
},
InvalidPrefix {
offset: usize,
},
InvalidExpansionLimit {
field: &'static str,
actual: usize,
maximum: usize,
},
ValueTooLong {
actual: usize,
maximum: usize,
},
TooManyCompositeItems {
actual: usize,
maximum: usize,
},
ExpansionTooLarge {
actual: usize,
maximum: usize,
},
PrefixAppliedToComposite {
variable: String,
},
DuplicateAssociativeKey {
key: String,
},
NonReversibleTemplate {
reason: UriTemplateMatchRejection,
},
NonScalarMatchValue {
variable: String,
},
AmbiguousEmptyScalar {
variable: String,
},
MatchInputTooLong {
actual: usize,
maximum: usize,
},
PreescapedReservedMatchValue {
variable: String,
},
}Expand description
One typed reason template parsing or expansion failed.
Variants§
SourceTooLong
Source text exceeded the fixed parser bound.
TooManyParts
Parsing would retain too many parts.
TooManyExpressions
Parsing would retain too many expressions.
TooManyVariables
An expression exceeded its variable-specification bound.
VariableNameTooLong
A variable name exceeded its byte bound.
InvalidLiteral
A literal used a character outside RFC 6570’s literal grammar.
UnclosedExpression
An expression opened without a matching closing brace.
NestedExpression
An expression attempted to nest another expression.
UnexpectedCloseBrace
A closing brace appeared outside an expression.
EmptyExpression
An expression did not contain a variable specification.
UnsupportedOperator
An expression used an RFC-reserved, unsupported operator.
InvalidVariable
A variable specification did not match the RFC 6570 grammar.
InvalidPrefix
A prefix modifier did not match the RFC’s positive four-digit grammar.
InvalidExpansionLimit
A caller tried to relax a fixed expansion limit or selected zero.
Fields
ValueTooLong
A supplied scalar, list member, map key, or map value was too large.
TooManyCompositeItems
Expansion would inspect too many composite members.
ExpansionTooLarge
Expansion output would exceed the configured byte bound.
Fields
PrefixAppliedToComposite
A prefix modifier was applied to a non-scalar value.
DuplicateAssociativeKey
An associative value supplied the same key more than once.
NonReversibleTemplate
A template is valid RFC 6570 syntax but has no deterministic inverse.
Fields
reason: UriTemplateMatchRejectionThe specific reason compilation was rejected.
NonScalarMatchValue
A reversible expansion received a list or associative value.
AmbiguousEmptyScalar
An empty simple or reserved scalar is indistinguishable from undefined.
MatchInputTooLong
A candidate URI exceeded the fixed reverse-match input bound.
PreescapedReservedMatchValue
A reversible reserved or fragment value contained a pre-escaped triplet.
Trait Implementations§
Source§impl Clone for UriTemplateError
impl Clone for UriTemplateError
Source§fn clone(&self) -> UriTemplateError
fn clone(&self) -> UriTemplateError
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for UriTemplateError
impl Debug for UriTemplateError
Source§impl Display for UriTemplateError
impl Display for UriTemplateError
impl Eq for UriTemplateError
Source§impl Error for UriTemplateError
impl Error for UriTemplateError
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
use the Display impl or to_string()
Source§impl PartialEq for UriTemplateError
impl PartialEq for UriTemplateError
impl StructuralPartialEq for UriTemplateError
Auto Trait Implementations§
impl Freeze for UriTemplateError
impl RefUnwindSafe for UriTemplateError
impl Send for UriTemplateError
impl Sync for UriTemplateError
impl Unpin for UriTemplateError
impl UnsafeUnpin for UriTemplateError
impl UnwindSafe for UriTemplateError
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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.