pub enum FileManagerError {
Show 14 variants
MissingArg(&'static str),
InvalidArg {
name: &'static str,
reason: String,
},
PrivateUrl(String),
HostNotAllowed {
host: String,
},
InvalidUrl(String),
Http {
url: String,
source: Error,
},
Upstream {
url: String,
status: u16,
body: String,
},
SizeCap {
limit: u64,
},
BadHeader {
name: String,
reason: String,
},
Io {
path: String,
source: Error,
},
UploadNotConfigured,
UnknownDestination(String),
Upload(String),
Base64(DecodeError),
}Variants§
MissingArg(&'static str)
InvalidArg
PrivateUrl(String)
HostNotAllowed
InvalidUrl(String)
Http
Upstream
SizeCap
BadHeader
Io
UploadNotConfigured
UnknownDestination(String)
Upload(String)
Base64(DecodeError)
Implementations§
Source§impl FileManagerError
impl FileManagerError
Sourcepub fn http_status(&self) -> u16
pub fn http_status(&self) -> u16
HTTP status this variant should map to when surfaced over the proxy
POST /call endpoint. Kept here (rather than in proxy/server.rs)
so adding a new error variant doesn’t silently default to 500 in one
handler and 400 in another.
Trait Implementations§
Source§impl Debug for FileManagerError
impl Debug for FileManagerError
Source§impl Display for FileManagerError
impl Display for FileManagerError
Source§impl Error for FileManagerError
impl Error for FileManagerError
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<DecodeError> for FileManagerError
impl From<DecodeError> for FileManagerError
Source§fn from(source: DecodeError) -> Self
fn from(source: DecodeError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for FileManagerError
impl !RefUnwindSafe for FileManagerError
impl Send for FileManagerError
impl Sync for FileManagerError
impl Unpin for FileManagerError
impl UnsafeUnpin for FileManagerError
impl !UnwindSafe for FileManagerError
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.