pub struct ModuleDefinition {
pub visibility: Visibility,
pub id: Identifier,
pub body: Body,
pub src_ref: SrcRef,
}Expand description
Module definition.
Fields§
§visibility: VisibilityVisibility of the module.
id: IdentifierName of the module.
body: BodyModule body.
src_ref: SrcRefSource code reference.
Implementations§
Source§impl ModuleDefinition
impl ModuleDefinition
Sourcepub fn new(visibility: Visibility, id: Identifier) -> Rc<Self>
pub fn new(visibility: Visibility, id: Identifier) -> Rc<Self>
Create a new module definition.
Trait Implementations§
Source§impl Clone for ModuleDefinition
impl Clone for ModuleDefinition
Source§fn clone(&self) -> ModuleDefinition
fn clone(&self) -> ModuleDefinition
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ModuleDefinition
impl Debug for ModuleDefinition
Source§impl Eval for ModuleDefinition
impl Eval for ModuleDefinition
Source§impl Grant<ModuleDefinition> for Context
impl Grant<ModuleDefinition> for Context
Source§fn grant(&mut self, statement: &ModuleDefinition) -> EvalResult<()>
fn grant(&mut self, statement: &ModuleDefinition) -> EvalResult<()>
Check if given statement
T is granted within the current contextSource§impl SrcReferrer for ModuleDefinition
impl SrcReferrer for ModuleDefinition
Source§impl TreeDisplay for ModuleDefinition
impl TreeDisplay for ModuleDefinition
Auto Trait Implementations§
impl Freeze for ModuleDefinition
impl !RefUnwindSafe for ModuleDefinition
impl !Send for ModuleDefinition
impl !Sync for ModuleDefinition
impl Unpin for ModuleDefinition
impl !UnwindSafe for ModuleDefinition
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