Enum RecipeError
#[non_exhaustive]pub enum RecipeError {
UnknownTemplate {
template: String,
},
UnknownRole {
role: String,
known: Vec<&'static str>,
},
Family {
template: String,
family: &'static str,
role: &'static str,
takes: &'static str,
},
}Expand description
Why a template could not take the place a recipe builder gave it.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
UnknownTemplate
The code names no registered template.
UnknownRole
The spelling names no segment role.
Family
The template is of a family the role does not build from.
Trait Implementations§
§impl Clone for RecipeError
impl Clone for RecipeError
§fn clone(&self) -> RecipeError
fn clone(&self) -> RecipeError
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read more§impl Debug for RecipeError
impl Debug for RecipeError
§impl Display for RecipeError
impl Display for RecipeError
impl Eq for RecipeError
§impl Error for RecipeError
impl Error for RecipeError
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()
§impl PartialEq for RecipeError
impl PartialEq for RecipeError
impl StructuralPartialEq for RecipeError
Auto Trait Implementations§
impl Freeze for RecipeError
impl RefUnwindSafe for RecipeError
impl Send for RecipeError
impl Sync for RecipeError
impl Unpin for RecipeError
impl UnsafeUnpin for RecipeError
impl UnwindSafe for RecipeError
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