pub enum DeclareError {
UniqueDeleted {
reason: Box<DeclareError>,
},
NonBranchSelected {
expect: String,
},
ConflictSelected {
conflict_with: Type,
this: Type,
},
NeverUsed {
in_group: Span,
reason: Option<Box<DeclareError>>,
},
Declared {
declare_as: Type,
},
Unexpect {
expect: String,
},
ShouldAlign {
left: Span,
right: Span,
},
WithLocation {
location: Span,
error: Box<DeclareError>,
},
WithPrevious {
previous: Type,
error: Box<DeclareError>,
},
Shared {
err: Rc<DeclareError>,
},
Filtered,
Empty,
}
Variants§
UniqueDeleted
Fields
§
reason: Box<DeclareError>
NonBranchSelected
ConflictSelected
NeverUsed
Declared
Unexpect
ShouldAlign
WithLocation
WithPrevious
Filtered
Empty
Implementations§
Source§impl DeclareError
impl DeclareError
pub fn with_location(self, location: Span) -> Self
pub fn with_previous(self, previous: Type) -> Self
pub fn generate(&self) -> Vec<Message>
Trait Implementations§
Source§impl Clone for DeclareError
impl Clone for DeclareError
Source§fn clone(&self) -> DeclareError
fn clone(&self) -> DeclareError
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl Freeze for DeclareError
impl RefUnwindSafe for DeclareError
impl !Send for DeclareError
impl !Sync for DeclareError
impl Unpin for DeclareError
impl UnwindSafe for DeclareError
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