#[non_exhaustive]pub enum EndpointError {
Prefix(String),
Empty(String),
MaxLen(usize),
Level {
input: String,
error: LevelError,
},
}Expand description
Error that can happen when parsing an endpoint.
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.
Prefix(String)
Missing forward slash at the beginning of the endpoint.
Empty(String)
Endpoints must contain at least one level.
The empty endpoint is reserved.
MaxLen(usize)
Endpoints must have at most 64 levels
Level
Couldn’t parse the endpoint’s level.
Trait Implementations§
Source§impl Clone for EndpointError
impl Clone for EndpointError
Source§fn clone(&self) -> EndpointError
fn clone(&self) -> EndpointError
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for EndpointError
impl Debug for EndpointError
Source§impl Display for EndpointError
impl Display for EndpointError
Source§impl Error for EndpointError
impl Error for EndpointError
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()
Source§impl From<EndpointError> for Error
impl From<EndpointError> for Error
Source§fn from(source: EndpointError) -> Self
fn from(source: EndpointError) -> Self
Converts to this type from the input type.
Source§impl From<EndpointError> for MappingError
impl From<EndpointError> for MappingError
Source§fn from(source: EndpointError) -> Self
fn from(source: EndpointError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for EndpointError
impl RefUnwindSafe for EndpointError
impl Send for EndpointError
impl Sync for EndpointError
impl Unpin for EndpointError
impl UnsafeUnpin for EndpointError
impl UnwindSafe for EndpointError
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