#[non_exhaustive]pub struct NamespaceDecl<'arena, 'src> {
pub name: Option<Name<'arena, 'src>>,
pub body: NamespaceBody<'arena, 'src>,
}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<'arena, 'src>>Namespace name; None for the global namespace.
body: NamespaceBody<'arena, 'src>Braced or simple form.
Implementations§
Source§impl<'arena, 'src> NamespaceDecl<'arena, 'src>
impl<'arena, 'src> NamespaceDecl<'arena, 'src>
Sourcepub fn new(
name: Option<Name<'arena, 'src>>,
body: NamespaceBody<'arena, 'src>,
) -> Self
pub fn new( name: Option<Name<'arena, 'src>>, body: NamespaceBody<'arena, 'src>, ) -> 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<'arena, 'src> Debug for NamespaceDecl<'arena, 'src>
impl<'arena, 'src> Debug for NamespaceDecl<'arena, 'src>
Auto Trait Implementations§
impl<'arena, 'src> !RefUnwindSafe for NamespaceDecl<'arena, 'src>
impl<'arena, 'src> !Send for NamespaceDecl<'arena, 'src>
impl<'arena, 'src> !Sync for NamespaceDecl<'arena, 'src>
impl<'arena, 'src> !UnwindSafe for NamespaceDecl<'arena, 'src>
impl<'arena, 'src> Freeze for NamespaceDecl<'arena, 'src>
impl<'arena, 'src> Unpin for NamespaceDecl<'arena, 'src>
impl<'arena, 'src> UnsafeUnpin for NamespaceDecl<'arena, 'src>
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