pub enum EffectPolicy {
CollectAll,
FailOnAny,
FailOnWarning,
FailOnTerminal,
}Expand description
Policy for handling effects during parsing.
Variants§
CollectAll
Collect all effects but continue on recoverable ones.
FailOnAny
Fail immediately on any effect.
FailOnWarning
Fail on warnings or worse.
FailOnTerminal
Only fail on terminal effects.
Implementations§
Source§impl EffectPolicy
impl EffectPolicy
Sourcepub fn should_fail(&self, effect: &ParserEffect) -> bool
pub fn should_fail(&self, effect: &ParserEffect) -> bool
Check if an effect should cause immediate failure under this policy.
Trait Implementations§
Source§impl Clone for EffectPolicy
impl Clone for EffectPolicy
Source§fn clone(&self) -> EffectPolicy
fn clone(&self) -> EffectPolicy
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 Copy for EffectPolicy
Source§impl Debug for EffectPolicy
impl Debug for EffectPolicy
Source§impl Default for EffectPolicy
impl Default for EffectPolicy
Source§fn default() -> EffectPolicy
fn default() -> EffectPolicy
Returns the “default value” for a type. Read more
impl Eq for EffectPolicy
Source§impl PartialEq for EffectPolicy
impl PartialEq for EffectPolicy
Source§fn eq(&self, other: &EffectPolicy) -> bool
fn eq(&self, other: &EffectPolicy) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for EffectPolicy
Auto Trait Implementations§
impl Freeze for EffectPolicy
impl RefUnwindSafe for EffectPolicy
impl Send for EffectPolicy
impl Sync for EffectPolicy
impl Unpin for EffectPolicy
impl UnsafeUnpin for EffectPolicy
impl UnwindSafe for EffectPolicy
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