#[non_exhaustive]pub enum OriginError {
InvalidUrl {
context: String,
url: String,
source: Box<dyn Error + Send + Sync>,
},
JoinUrl {
context: String,
base_url: String,
path: String,
source: Box<dyn Error + Send + Sync>,
},
InvalidRelativePath {
path: String,
},
UrlNotPathBase {
url: String,
},
UnknownOrigin {
raw_url: String,
},
OriginBasePathMismatch {
raw_url: String,
},
UnsupportedUrlScheme {
context: String,
url: String,
},
}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.
InvalidUrl
JoinUrl
InvalidRelativePath
UrlNotPathBase
UnknownOrigin
OriginBasePathMismatch
UnsupportedUrlScheme
Implementations§
Source§impl OriginError
impl OriginError
pub fn invalid_url( context: impl Into<String>, url: impl Into<String>, source: impl Error + Send + Sync + 'static, ) -> OriginError
pub fn join_url( context: impl Into<String>, base_url: impl Into<String>, path: impl Into<String>, source: impl Error + Send + Sync + 'static, ) -> OriginError
Trait Implementations§
Source§impl Debug for OriginError
impl Debug for OriginError
Source§impl Display for OriginError
impl Display for OriginError
Source§impl Error for OriginError
impl Error for OriginError
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<OriginError> for Error
impl From<OriginError> for Error
Source§fn from(source: OriginError) -> Self
fn from(source: OriginError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl !RefUnwindSafe for OriginError
impl !UnwindSafe for OriginError
impl Forget for OriginError
impl Freeze for OriginError
impl Move for OriginError
impl Send for OriginError
impl Sync for OriginError
impl Unpin for OriginError
impl UnsafeUnpin for OriginErrorwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
*const dyn Error + Send + Sync is !null: UnsafeUnpin,
PhantomData<dyn Error + Send + Sync>: UnsafeUnpin,
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