pub enum RecoveryStrategy {
SkipOnError,
SkipOnFatal,
AbortOnAny,
}Expand description
Configurable error-recovery policy for the tolerant compiler.
Variants§
SkipOnError
Skip only the offending expression on any blocking diagnostic (Error or Fatal). Every well-formed expression is still compiled.
This is the most tolerant mode and the default for partial error recovery.
SkipOnFatal
Skip the offending expression on Severity::Error but abort the
entire program on Severity::Fatal.
AbortOnAny
Abort on the first blocking diagnostic (Error or Fatal). Warnings and Infos are still collected but never cause an abort.
This is functionally equivalent to the pre-existing strict compilation mode but also returns the partial diagnostics collected so far.
Implementations§
Source§impl RecoveryStrategy
impl RecoveryStrategy
Sourcepub fn decide(self, severity: Severity) -> RecoveryAction
pub fn decide(self, severity: Severity) -> RecoveryAction
Decide what the driver should do for a diagnostic of this severity.
Trait Implementations§
Source§impl Clone for RecoveryStrategy
impl Clone for RecoveryStrategy
Source§fn clone(&self) -> RecoveryStrategy
fn clone(&self) -> RecoveryStrategy
Returns a duplicate 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 moreSource§impl Debug for RecoveryStrategy
impl Debug for RecoveryStrategy
Source§impl Default for RecoveryStrategy
impl Default for RecoveryStrategy
Source§fn default() -> RecoveryStrategy
fn default() -> RecoveryStrategy
Returns the “default value” for a type. Read more
Source§impl Hash for RecoveryStrategy
impl Hash for RecoveryStrategy
Source§impl PartialEq for RecoveryStrategy
impl PartialEq for RecoveryStrategy
impl Copy for RecoveryStrategy
impl Eq for RecoveryStrategy
impl StructuralPartialEq for RecoveryStrategy
Auto Trait Implementations§
impl Freeze for RecoveryStrategy
impl RefUnwindSafe for RecoveryStrategy
impl Send for RecoveryStrategy
impl Sync for RecoveryStrategy
impl Unpin for RecoveryStrategy
impl UnsafeUnpin for RecoveryStrategy
impl UnwindSafe for RecoveryStrategy
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.