pub enum ValidationCode {
TargetNotFound,
DuplicateSymbol,
InvalidSyntax,
MissingDependency,
SymbolReferenced,
SameSymbolTarget,
ImplTargetNotFound,
PotentiallyUnusedImport,
VisibilityMismatch,
NamingConvention,
NoOp,
UnreferencedSymbol,
}Expand description
Validation issue code for categorization
Variants§
TargetNotFound
Target symbol does not exist (Rename/Remove)
DuplicateSymbol
Symbol already exists (Add)
InvalidSyntax
Generated code would fail syn parse
MissingDependency
Required type/trait not found
SymbolReferenced
Symbol is referenced elsewhere (Remove may break references)
SameSymbolTarget
Another mutation targets the same symbol
ImplTargetNotFound
Impl block target type not found in file
PotentiallyUnusedImport
Added import may be unused
VisibilityMismatch
Visibility may not be sufficient
NamingConvention
Naming convention violation
NoOp
No changes would be made (already applied, etc.)
UnreferencedSymbol
Symbol has no references (safe to remove)
Implementations§
Source§impl ValidationCode
impl ValidationCode
Sourcepub fn default_level(&self) -> ValidationLevel
pub fn default_level(&self) -> ValidationLevel
Get the default level for this code
Sourcepub fn user_friendly_message(&self) -> &'static str
pub fn user_friendly_message(&self) -> &'static str
Get a user-friendly description of this error code
Sourcepub fn suggestion(&self) -> Option<&'static str>
pub fn suggestion(&self) -> Option<&'static str>
Get a suggestion for how to fix this issue
Trait Implementations§
Source§impl Clone for ValidationCode
impl Clone for ValidationCode
Source§fn clone(&self) -> ValidationCode
fn clone(&self) -> ValidationCode
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 moreSource§impl Debug for ValidationCode
impl Debug for ValidationCode
Source§impl<'de> Deserialize<'de> for ValidationCode
impl<'de> Deserialize<'de> for ValidationCode
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Hash for ValidationCode
impl Hash for ValidationCode
Source§impl PartialEq for ValidationCode
impl PartialEq for ValidationCode
Source§fn eq(&self, other: &ValidationCode) -> bool
fn eq(&self, other: &ValidationCode) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for ValidationCode
impl Serialize for ValidationCode
impl Copy for ValidationCode
impl Eq for ValidationCode
impl StructuralPartialEq for ValidationCode
Auto Trait Implementations§
impl Freeze for ValidationCode
impl RefUnwindSafe for ValidationCode
impl Send for ValidationCode
impl Sync for ValidationCode
impl Unpin for ValidationCode
impl UnsafeUnpin for ValidationCode
impl UnwindSafe for ValidationCode
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