pub enum PublishError {
MissingField {
field: String,
slug: String,
source_path: Option<PathBuf>,
suggestion: Option<String>,
},
TemplateNotFound {
content_type: String,
slug: String,
available_templates: Vec<String>,
},
ProviderFailed {
provider_id: String,
cause: String,
suggestion: Option<String>,
},
RenderFailed {
template_name: String,
slug: Option<String>,
cause: String,
},
FetchFailed {
source_name: String,
cause: String,
},
Config {
message: String,
path: Option<String>,
},
PagePrerendererFailed {
page_type: String,
cause: String,
},
}Variants§
Implementations§
Source§impl PublishError
impl PublishError
pub fn missing_field(field: impl Into<String>, slug: impl Into<String>) -> Self
pub fn missing_field_with_path( field: impl Into<String>, slug: impl Into<String>, path: PathBuf, ) -> Self
pub fn template_not_found( content_type: impl Into<String>, slug: impl Into<String>, available: Vec<String>, ) -> Self
pub fn provider_failed( provider_id: impl Into<String>, cause: impl Into<String>, ) -> Self
pub fn render_failed( template_name: impl Into<String>, slug: Option<String>, cause: impl Into<String>, ) -> Self
pub fn fetch_failed( source_name: impl Into<String>, cause: impl Into<String>, ) -> Self
pub fn config(message: impl Into<String>) -> Self
pub fn page_prerenderer_failed( page_type: impl Into<String>, cause: impl Into<String>, ) -> Self
pub fn location(&self) -> Option<String>
pub fn suggestion_string(&self) -> Option<String>
pub fn cause_string(&self) -> Option<String>
Trait Implementations§
Source§impl Debug for PublishError
impl Debug for PublishError
Source§impl Display for PublishError
impl Display for PublishError
Source§impl Error for PublishError
impl Error for PublishError
1.30.0 · 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 Freeze for PublishError
impl RefUnwindSafe for PublishError
impl Send for PublishError
impl Sync for PublishError
impl Unpin for PublishError
impl UnwindSafe for PublishError
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§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.
Source§impl<T> ValidateIp for Twhere
T: ToString,
impl<T> ValidateIp for Twhere
T: ToString,
Source§fn validate_ipv4(&self) -> bool
fn validate_ipv4(&self) -> bool
Validates whether the given string is an IP V4
Source§fn validate_ipv6(&self) -> bool
fn validate_ipv6(&self) -> bool
Validates whether the given string is an IP V6
Source§fn validate_ip(&self) -> bool
fn validate_ip(&self) -> bool
Validates whether the given string is an IP