pub enum GlobalDirective {
Diagnostic(DiagnosticDirective),
Enable(EnableDirective),
Requires(RequiresDirective),
}
Variants§
Implementations§
Source§impl GlobalDirective
impl GlobalDirective
Sourcepub const fn is_diagnostic(&self) -> bool
pub const fn is_diagnostic(&self) -> bool
Returns true
if this value is of type Diagnostic
. Returns false
otherwise
Sourcepub const fn is_enable(&self) -> bool
pub const fn is_enable(&self) -> bool
Returns true
if this value is of type Enable
. Returns false
otherwise
Sourcepub const fn is_requires(&self) -> bool
pub const fn is_requires(&self) -> bool
Returns true
if this value is of type Requires
. Returns false
otherwise
Source§impl GlobalDirective
impl GlobalDirective
Sourcepub fn unwrap_diagnostic(self) -> DiagnosticDirective
pub fn unwrap_diagnostic(self) -> DiagnosticDirective
Unwraps this value to the GlobalDirective::Diagnostic
variant.
Panics if this value is of any other type.
Sourcepub fn unwrap_enable(self) -> EnableDirective
pub fn unwrap_enable(self) -> EnableDirective
Unwraps this value to the GlobalDirective::Enable
variant.
Panics if this value is of any other type.
Sourcepub fn unwrap_requires(self) -> RequiresDirective
pub fn unwrap_requires(self) -> RequiresDirective
Unwraps this value to the GlobalDirective::Requires
variant.
Panics if this value is of any other type.
Trait Implementations§
Source§impl Clone for GlobalDirective
impl Clone for GlobalDirective
Source§fn clone(&self) -> GlobalDirective
fn clone(&self) -> GlobalDirective
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 GlobalDirective
impl Debug for GlobalDirective
Source§impl Display for GlobalDirective
impl Display for GlobalDirective
Source§impl From<DiagnosticDirective> for GlobalDirective
impl From<DiagnosticDirective> for GlobalDirective
Source§fn from(value: DiagnosticDirective) -> Self
fn from(value: DiagnosticDirective) -> Self
Converts to this type from the input type.
Source§impl From<EnableDirective> for GlobalDirective
impl From<EnableDirective> for GlobalDirective
Source§fn from(value: EnableDirective) -> Self
fn from(value: EnableDirective) -> Self
Converts to this type from the input type.
Source§impl From<RequiresDirective> for GlobalDirective
impl From<RequiresDirective> for GlobalDirective
Source§fn from(value: RequiresDirective) -> Self
fn from(value: RequiresDirective) -> Self
Converts to this type from the input type.
Source§impl FromStr for GlobalDirective
impl FromStr for GlobalDirective
Source§impl PartialEq for GlobalDirective
impl PartialEq for GlobalDirective
impl StructuralPartialEq for GlobalDirective
Auto Trait Implementations§
impl Freeze for GlobalDirective
impl RefUnwindSafe for GlobalDirective
impl Send for GlobalDirective
impl Sync for GlobalDirective
impl Unpin for GlobalDirective
impl UnwindSafe for GlobalDirective
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<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more