pub struct ModuleDecl {
pub matching_source: Fragment,
pub name: Identifier,
pub inner_docs: Vec<DocComment>,
pub items: Option<Vec<Item>>,
}Available on crate feature
ast-models only.Expand description
A module declaration.
Fields§
§matching_source: FragmentFull matching source of the declaration.
name: IdentifierThe name of the module.
inner_docs: Vec<DocComment>Inner doc comments (//! and /*! */) at the start of an inline module’s body.
items: Option<Vec<Item>>The items of an inline module (mod name { ... }), or None for a module declared to be in another file
(mod name;).
Trait Implementations§
Source§impl Clone for ModuleDecl
impl Clone for ModuleDecl
Source§impl Debug for ModuleDecl
impl Debug for ModuleDecl
Source§impl PartialEq for ModuleDecl
impl PartialEq for ModuleDecl
impl StructuralPartialEq for ModuleDecl
Auto Trait Implementations§
impl Forget for ModuleDecl
impl Freeze for ModuleDecl
impl RefUnwindSafe for ModuleDecl
impl Send for ModuleDecl
impl Sync for ModuleDecl
impl Unpin for ModuleDecl
impl UnsafeUnpin for ModuleDecl
impl UnwindSafe for ModuleDecl
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