pub enum ImportPreludeSupportsType {
SupportsCondition(SupportsCondition),
Declaration(Box<Declaration>),
}
Variants
SupportsCondition(SupportsCondition)
Declaration(Box<Declaration>)
Implementations
sourceimpl ImportPreludeSupportsType
impl ImportPreludeSupportsType
sourcepub fn is_supports_condition(&self) -> bool
pub fn is_supports_condition(&self) -> bool
Returns true
if self
is of variant SupportsCondition
.
sourcepub fn as_supports_condition(&self) -> Option<&SupportsCondition>
pub fn as_supports_condition(&self) -> Option<&SupportsCondition>
Returns Some
if self
is a reference of variant SupportsCondition
, and None
otherwise.
sourcepub fn as_mut_supports_condition(&mut self) -> Option<&mut SupportsCondition>
pub fn as_mut_supports_condition(&mut self) -> Option<&mut SupportsCondition>
Returns Some
if self
is a mutable reference of variant SupportsCondition
, and None
otherwise.
sourcepub fn expect_supports_condition(self) -> SupportsConditionwhere
Self: Debug,
pub fn expect_supports_condition(self) -> SupportsConditionwhere
Self: Debug,
Unwraps the value, yielding the content of SupportsCondition
.
Panics
Panics if the value is not SupportsCondition
, with a panic message including the content of self
.
sourcepub fn supports_condition(self) -> Option<SupportsCondition>
pub fn supports_condition(self) -> Option<SupportsCondition>
Returns Some
if self
is of variant SupportsCondition
, and None
otherwise.
sourcepub fn is_declaration(&self) -> bool
pub fn is_declaration(&self) -> bool
Returns true
if self
is of variant Declaration
.
sourcepub fn as_declaration(&self) -> Option<&Box<Declaration>>
pub fn as_declaration(&self) -> Option<&Box<Declaration>>
Returns Some
if self
is a reference of variant Declaration
, and None
otherwise.
sourcepub fn as_mut_declaration(&mut self) -> Option<&mut Box<Declaration>>
pub fn as_mut_declaration(&mut self) -> Option<&mut Box<Declaration>>
Returns Some
if self
is a mutable reference of variant Declaration
, and None
otherwise.
sourcepub fn expect_declaration(self) -> Box<Declaration>where
Self: Debug,
pub fn expect_declaration(self) -> Box<Declaration>where
Self: Debug,
Unwraps the value, yielding the content of Declaration
.
Panics
Panics if the value is not Declaration
, with a panic message including the content of self
.
sourcepub fn declaration(self) -> Option<Box<Declaration>>
pub fn declaration(self) -> Option<Box<Declaration>>
Returns Some
if self
is of variant Declaration
, and None
otherwise.
Trait Implementations
sourceimpl Clone for ImportPreludeSupportsType
impl Clone for ImportPreludeSupportsType
sourcefn clone(&self) -> ImportPreludeSupportsType
fn clone(&self) -> ImportPreludeSupportsType
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more