pub enum Error {
NotFound(String),
PermissionDenied(String),
Io(Error),
InvalidPath(String),
DiskNotConfigured(String),
NotImplemented(String),
Serialization(String),
Cdn(String),
CdnInvalidProvider(String),
CdnFeatureRequired(String, &'static str),
}Expand description
Storage error types.
Variants§
NotFound(String)
File not found.
PermissionDenied(String)
Permission denied.
Io(Error)
IO error.
InvalidPath(String)
Invalid path.
DiskNotConfigured(String)
Disk not configured.
NotImplemented(String)
Feature not yet implemented.
Serialization(String)
Serialization error.
Cdn(String)
CDN operation error.
CdnInvalidProvider(String)
CDN provider name is not recognized.
CdnFeatureRequired(String, &'static str)
Selected CDN provider requires a cargo feature that is not enabled.
Implementations§
Source§impl Error
impl Error
Sourcepub fn permission_denied(msg: impl Into<String>) -> Self
pub fn permission_denied(msg: impl Into<String>) -> Self
Create a permission denied error.
Sourcepub fn invalid_path(path: impl Into<String>) -> Self
pub fn invalid_path(path: impl Into<String>) -> Self
Create an invalid path error.
Sourcepub fn disk_not_configured(disk: impl Into<String>) -> Self
pub fn disk_not_configured(disk: impl Into<String>) -> Self
Create a disk not configured error.
Sourcepub fn not_implemented(feature: impl Into<String>) -> Self
pub fn not_implemented(feature: impl Into<String>) -> Self
Create a not implemented error.
Sourcepub fn cdn_invalid_provider(val: impl Into<String>) -> Self
pub fn cdn_invalid_provider(val: impl Into<String>) -> Self
Create a CDN invalid provider error.
Sourcepub fn cdn_feature_required(provider: &str, feature: &'static str) -> Self
pub fn cdn_feature_required(provider: &str, feature: &'static str) -> Self
Create a CDN feature-required error.
Trait Implementations§
Source§impl Error for Error
impl Error for Error
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()
Auto Trait Implementations§
impl !RefUnwindSafe for Error
impl !UnwindSafe for Error
impl Freeze for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnsafeUnpin for Error
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.