pub struct RubyModule {
pub name: String,
pub constants: Vec<(String, RubyExpr)>,
pub functions: Vec<RubyMethod>,
pub classes: Vec<RubyClass>,
pub submodules: Vec<RubyModule>,
pub module_function: bool,
}Expand description
A Ruby module definition (also used as the top-level compilation unit).
Fields§
§name: StringModule name (CamelCase).
constants: Vec<(String, RubyExpr)>Module-level constants and assignments.
functions: Vec<RubyMethod>Module methods (emitted as module_function or def self.name).
classes: Vec<RubyClass>Nested classes inside this module.
submodules: Vec<RubyModule>Nested sub-modules.
module_function: boolWhether to emit module_function marker before functions.
Implementations§
Trait Implementations§
Source§impl Clone for RubyModule
impl Clone for RubyModule
Source§fn clone(&self) -> RubyModule
fn clone(&self) -> RubyModule
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 RubyModule
impl Debug for RubyModule
Source§impl PartialEq for RubyModule
impl PartialEq for RubyModule
impl StructuralPartialEq for RubyModule
Auto Trait Implementations§
impl Freeze for RubyModule
impl RefUnwindSafe for RubyModule
impl Send for RubyModule
impl Sync for RubyModule
impl Unpin for RubyModule
impl UnsafeUnpin for RubyModule
impl UnwindSafe for RubyModule
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