Enum poem::error::StaticFileError
source · [−]pub enum StaticFileError {
MethodNotAllowed(Method),
InvalidPath,
Forbidden(String),
NotFound,
PreconditionFailed,
RangeNotSatisfiable {
size: u64,
},
Io(Error),
}
Expand description
A possible error value when processing static files.
Variants
MethodNotAllowed(Method)
Method not allow
InvalidPath
Invalid path
Forbidden(String)
Forbidden
NotFound
File not found
PreconditionFailed
Precondition failed
RangeNotSatisfiable
Fields
size: u64
Content length
Range not satisfiable
Io(Error)
Io error
Trait Implementations
sourceimpl Debug for StaticFileError
impl Debug for StaticFileError
sourceimpl Display for StaticFileError
impl Display for StaticFileError
sourceimpl Error for StaticFileError
impl Error for StaticFileError
sourcefn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
1.0.0 · sourcefn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
sourceimpl From<Error> for StaticFileError
impl From<Error> for StaticFileError
sourceimpl ResponseError for StaticFileError
impl ResponseError for StaticFileError
sourcefn status(&self) -> StatusCode
fn status(&self) -> StatusCode
The status code of this error.
sourcefn as_response(&self) -> Response
fn as_response(&self) -> Response
Convert this error to a HTTP response.
Auto Trait Implementations
impl !RefUnwindSafe for StaticFileError
impl Send for StaticFileError
impl Sync for StaticFileError
impl Unpin for StaticFileError
impl !UnwindSafe for StaticFileError
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more