[−][src]Enum rocket_cors::Error
Errors during operations
This enum implements rocket::response::Responder
which will return an appropriate status code
while printing out the error in the console.
Because these errors are usually the result of an error while trying to respond to a CORS
request, CORS headers cannot be added to the response and your applications requesting CORS
will not be able to see the status code.
Variants
MissingOrigin
The HTTP request header Origin
is required but was not provided
BadOrigin(ParseError)
The HTTP request header Origin
could not be parsed correctly.
OpaqueAllowedOrigin(Vec<String>)
The configured Allowed Origins are Opaque origins. Use a Regex instead.
MissingRequestMethod
The request header Access-Control-Request-Method
is required but is missing
BadRequestMethod
The request header Access-Control-Request-Method
has an invalid value
MissingRequestHeaders
The request header Access-Control-Request-Headers
is required but is missing.
OriginNotAllowed(String)
Origin is not allowed to make this request
MethodNotAllowed(String)
Requested method is not allowed
RegexError(Error)
A regular expression compilation error
HeadersNotAllowed
One or more headers requested are not allowed
CredentialsWithWildcardOrigin
Credentials are allowed, but the Origin is set to "*". This is not allowed by W3C
This is a misconfiguration. Check the docuemntation for Cors
.
MissingCorsInRocketState
A CORS Request Guard was used, but no CORS Options was available in Rocket's state
This is a misconfiguration. Use Rocket::manage
to add a CORS options to managed state.
MissingInjectedHeader
The on_response
handler of Fairing could not find the injected header from the Request.
Either some other fairing has removed it, or this is a bug.
Trait Implementations
impl From<ParseError> for Error
[src]
fn from(error: ParseError) -> Self
[src]
impl From<Error> for Error
[src]
impl Debug for Error
[src]
impl Display for Error
[src]
impl Error for Error
[src]
fn cause(&self) -> Option<&dyn Error>
[src]
fn description(&self) -> &str
1.0.0[src]
This method is soft-deprecated. Read more
fn source(&self) -> Option<&(dyn Error + 'static)>
1.30.0[src]
The lower-level source of this error, if any. Read more
impl<'r> Responder<'r> for Error
[src]
fn respond_to(self, _: &Request) -> Result<Response<'r>, Status>
[src]
Auto Trait Implementations
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Typeable for T where
T: Any,
T: Any,
impl<T> IntoCollection<T> for T
fn into_collection<A>(self) -> SmallVec<A> where
A: Array<Item = T>,
A: Array<Item = T>,
fn mapped<U, F, A>(self, f: F) -> SmallVec<A> where
A: Array<Item = U>,
F: FnMut(T) -> U,
A: Array<Item = U>,
F: FnMut(T) -> U,
impl<T, I> AsResult<T, I> for T where
I: Input,
I: Input,