pub struct OcamlModule {
pub name: String,
pub definitions: Vec<OcamlDefinition>,
pub is_top_level: bool,
}Expand description
An OCaml module (.ml file or nested module M = struct ... end).
Fields§
§name: String§definitions: Vec<OcamlDefinition>§is_top_level: boolWhether this is a top-level file module (affects emit format).
Implementations§
Source§impl OcamlModule
impl OcamlModule
Sourcepub fn add(&mut self, def: OcamlDefinition)
pub fn add(&mut self, def: OcamlDefinition)
Add a definition to the module.
Trait Implementations§
Source§impl Clone for OcamlModule
impl Clone for OcamlModule
Source§fn clone(&self) -> OcamlModule
fn clone(&self) -> OcamlModule
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 OcamlModule
impl Debug for OcamlModule
Auto Trait Implementations§
impl Freeze for OcamlModule
impl RefUnwindSafe for OcamlModule
impl Send for OcamlModule
impl Sync for OcamlModule
impl Unpin for OcamlModule
impl UnsafeUnpin for OcamlModule
impl UnwindSafe for OcamlModule
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