Enum rustful::response::FileError
[−]
[src]
Error that may occure while sending a file.
Variants
Open(Error, Response<'a, 'b>)
Failed to open the file.
Send(Error)
Failed while sending the file.
Methods
impl<'a, 'b> FileError<'a, 'b>
[src]
impl<'a, 'b> FileError<'a, 'b>
pub fn recover_response(self) -> Result<Response<'a, 'b>, FileError<'a, 'b>>
[src]
pub fn recover_response(self) -> Result<Response<'a, 'b>, FileError<'a, 'b>>
Recover the response if the file couldn't be opened.
pub fn send_not_found<'d, M: Into<Data<'d>>>(
self,
message: M
) -> Result<(), FileError<'a, 'b>>
[src]
pub fn send_not_found<'d, M: Into<Data<'d>>>(
self,
message: M
) -> Result<(), FileError<'a, 'b>>
Send a 404 (not found) response if the file wasn't found, or return
self
if any other error occurred.
pub fn ignore_send_error(self) -> Result<(), (Error, Response<'a, 'b>)>
[src]
pub fn ignore_send_error(self) -> Result<(), (Error, Response<'a, 'b>)>
Ignore any error that might have occurred while sending the file.
Trait Implementations
impl<'a, 'b> ResponseError for FileError<'a, 'b>
[src]
impl<'a, 'b> ResponseError for FileError<'a, 'b>
impl<'a, 'b> Into<Error> for FileError<'a, 'b>
[src]
impl<'a, 'b> Into<Error> for FileError<'a, 'b>
impl<'a, 'b> Debug for FileError<'a, 'b>
[src]
impl<'a, 'b> Debug for FileError<'a, 'b>
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl<'a, 'b> Display for FileError<'a, 'b>
[src]
impl<'a, 'b> Display for FileError<'a, 'b>
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl<'a, 'b> Error for FileError<'a, 'b>
[src]
impl<'a, 'b> Error for FileError<'a, 'b>