#[non_exhaustive]pub struct NamespaceDecl {
pub name: Option<Name>,
pub body: NamespaceBody,
}Expand description
A namespace declaration.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.name: Option<Name>Namespace name; None for the global namespace.
body: NamespaceBodyBraced or simple form.
Implementations§
Source§impl NamespaceDecl
impl NamespaceDecl
Sourcepub fn new(name: Option<Name>, body: NamespaceBody) -> Self
pub fn new(name: Option<Name>, body: NamespaceBody) -> Self
Builds a NamespaceDecl from its identifying fields with every other field empty. Set
the rest by assignment, as with Param::new.
Trait Implementations§
Source§impl Clone for NamespaceDecl
impl Clone for NamespaceDecl
Source§impl Debug for NamespaceDecl
impl Debug for NamespaceDecl
Auto Trait Implementations§
impl Freeze for NamespaceDecl
impl RefUnwindSafe for NamespaceDecl
impl Send for NamespaceDecl
impl Sync for NamespaceDecl
impl Unpin for NamespaceDecl
impl UnsafeUnpin for NamespaceDecl
impl UnwindSafe for NamespaceDecl
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