#[non_exhaustive]pub enum CustomDefinitionValidationError {
Blank {
subject: &'static str,
field: String,
},
Padded {
subject: &'static str,
field: String,
},
ContainsSeparator {
subject: &'static str,
field: String,
separator: char,
},
DuplicateAlias {
subject: &'static str,
alias: String,
},
ReservedLabel {
subject: &'static str,
field: String,
label: String,
},
NonFinite {
subject: &'static str,
field: String,
},
IncompletePair {
subject: &'static str,
first: String,
second: String,
},
}Expand description
Validation failure for a custom body, house system, or ayanamsa definition.
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.
Blank
A required field was blank.
Fields
Padded
A field carried leading or trailing whitespace.
Fields
ContainsSeparator
A field contained the : separator used by custom body identifiers.
Fields
DuplicateAlias
A list of aliases contained a duplicate value.
Fields
ReservedLabel
A label collides with a built-in descriptor or alias.
Fields
NonFinite
A numeric field was not finite.
Fields
IncompletePair
Two optional fields must be supplied together.
Implementations§
Source§impl CustomDefinitionValidationError
impl CustomDefinitionValidationError
Sourcepub fn summary_line(&self) -> String
pub fn summary_line(&self) -> String
Returns a compact one-line rendering of the validation failure.
Trait Implementations§
Source§impl Clone for CustomDefinitionValidationError
impl Clone for CustomDefinitionValidationError
Source§fn clone(&self) -> CustomDefinitionValidationError
fn clone(&self) -> CustomDefinitionValidationError
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 moreimpl Eq for CustomDefinitionValidationError
Source§impl Error for CustomDefinitionValidationError
impl Error for CustomDefinitionValidationError
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 StructuralPartialEq for CustomDefinitionValidationError
Auto Trait Implementations§
impl Freeze for CustomDefinitionValidationError
impl RefUnwindSafe for CustomDefinitionValidationError
impl Send for CustomDefinitionValidationError
impl Sync for CustomDefinitionValidationError
impl Unpin for CustomDefinitionValidationError
impl UnsafeUnpin for CustomDefinitionValidationError
impl UnwindSafe for CustomDefinitionValidationError
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