pub enum GlobalDeclaration {
Void,
Declaration(Declaration),
TypeAlias(TypeAlias),
Struct(Struct),
Function(Function),
ConstAssert(ConstAssert),
}
Variants§
Void
Declaration(Declaration)
TypeAlias(TypeAlias)
Struct(Struct)
Function(Function)
ConstAssert(ConstAssert)
Implementations§
Source§impl GlobalDeclaration
impl GlobalDeclaration
Sourcepub const fn is_void(&self) -> bool
pub const fn is_void(&self) -> bool
Returns true
if this value is of type Void
. Returns false
otherwise
Sourcepub const fn is_declaration(&self) -> bool
pub const fn is_declaration(&self) -> bool
Returns true
if this value is of type Declaration
. Returns false
otherwise
Sourcepub const fn is_type_alias(&self) -> bool
pub const fn is_type_alias(&self) -> bool
Returns true
if this value is of type TypeAlias
. Returns false
otherwise
Sourcepub const fn is_struct(&self) -> bool
pub const fn is_struct(&self) -> bool
Returns true
if this value is of type Struct
. Returns false
otherwise
Sourcepub const fn is_function(&self) -> bool
pub const fn is_function(&self) -> bool
Returns true
if this value is of type Function
. Returns false
otherwise
Sourcepub const fn is_const_assert(&self) -> bool
pub const fn is_const_assert(&self) -> bool
Returns true
if this value is of type ConstAssert
. Returns false
otherwise
Source§impl GlobalDeclaration
impl GlobalDeclaration
Sourcepub fn unwrap_void(self)
pub fn unwrap_void(self)
Unwraps this value to the GlobalDeclaration::Void
variant.
Panics if this value is of any other type.
Sourcepub fn unwrap_declaration(self) -> Declaration
pub fn unwrap_declaration(self) -> Declaration
Unwraps this value to the GlobalDeclaration::Declaration
variant.
Panics if this value is of any other type.
Sourcepub fn unwrap_type_alias(self) -> TypeAlias
pub fn unwrap_type_alias(self) -> TypeAlias
Unwraps this value to the GlobalDeclaration::TypeAlias
variant.
Panics if this value is of any other type.
Sourcepub fn unwrap_struct(self) -> Struct
pub fn unwrap_struct(self) -> Struct
Unwraps this value to the GlobalDeclaration::Struct
variant.
Panics if this value is of any other type.
Sourcepub fn unwrap_function(self) -> Function
pub fn unwrap_function(self) -> Function
Unwraps this value to the GlobalDeclaration::Function
variant.
Panics if this value is of any other type.
Sourcepub fn unwrap_const_assert(self) -> ConstAssert
pub fn unwrap_const_assert(self) -> ConstAssert
Unwraps this value to the GlobalDeclaration::ConstAssert
variant.
Panics if this value is of any other type.
Source§impl GlobalDeclaration
impl GlobalDeclaration
Sourcepub fn remove_voids(&mut self)
pub fn remove_voids(&mut self)
Remove all Statement::Void
Trait Implementations§
Source§impl Clone for GlobalDeclaration
impl Clone for GlobalDeclaration
Source§fn clone(&self) -> GlobalDeclaration
fn clone(&self) -> GlobalDeclaration
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for GlobalDeclaration
impl Debug for GlobalDeclaration
Source§impl Display for GlobalDeclaration
impl Display for GlobalDeclaration
Source§impl From<ConstAssert> for GlobalDeclaration
impl From<ConstAssert> for GlobalDeclaration
Source§fn from(value: ConstAssert) -> Self
fn from(value: ConstAssert) -> Self
Source§impl From<Declaration> for GlobalDeclaration
impl From<Declaration> for GlobalDeclaration
Source§fn from(value: Declaration) -> Self
fn from(value: Declaration) -> Self
Source§impl From<Function> for GlobalDeclaration
impl From<Function> for GlobalDeclaration
Source§impl From<Struct> for GlobalDeclaration
impl From<Struct> for GlobalDeclaration
Source§impl From<TypeAlias> for GlobalDeclaration
impl From<TypeAlias> for GlobalDeclaration
Source§impl FromStr for GlobalDeclaration
impl FromStr for GlobalDeclaration
Source§impl PartialEq for GlobalDeclaration
impl PartialEq for GlobalDeclaration
impl StructuralPartialEq for GlobalDeclaration
Auto Trait Implementations§
impl Freeze for GlobalDeclaration
impl RefUnwindSafe for GlobalDeclaration
impl Send for GlobalDeclaration
impl Sync for GlobalDeclaration
impl Unpin for GlobalDeclaration
impl UnwindSafe for GlobalDeclaration
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
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>
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>
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