pub enum ProfileError {
MissingField {
field: Cow<'static, str>,
},
InvalidField {
field: &'static str,
value: String,
reason: String,
},
}Expand description
Errors that arise from a malformed or incomplete profile configuration.
These are distinct from message-validation errors (Error::Validation).
A ProfileError signals that the profile itself is incorrect — e.g. a
required field is missing from a profiles/**/*.json file. Message-level
errors are represented by Error::Validation.
Variants§
MissingField
A mandatory field is absent from the profile data.
This should never occur for profiles generated by cargo xtask codegen,
but it can arise when building profiles programmatically.
Fields
InvalidField
A field value is present but does not meet the profile’s constraints.
Trait Implementations§
Source§impl Debug for ProfileError
impl Debug for ProfileError
Source§impl Display for ProfileError
impl Display for ProfileError
Source§impl Error for ProfileError
impl Error for ProfileError
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()
Source§impl From<ProfileError> for Error
impl From<ProfileError> for Error
Source§fn from(source: ProfileError) -> Self
fn from(source: ProfileError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for ProfileError
impl RefUnwindSafe for ProfileError
impl Send for ProfileError
impl Sync for ProfileError
impl Unpin for ProfileError
impl UnsafeUnpin for ProfileError
impl UnwindSafe for ProfileError
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> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
Source§fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
Fallible version of
ToCompactString::to_compact_string() Read moreSource§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
Converts the given value to a
CompactString. Read more