Skip to main content

ModuleManager

Struct ModuleManager 

Source
pub struct ModuleManager {
    pub run_file_paths: Vec<Rc<str>>,
    pub module_name_and_path_map: HashMap<String, String>,
    pub module_path_and_names_map: HashMap<String, Vec<String>>,
    pub current_module_path: String,
    pub current_module_name: String,
    pub current_file_index: usize,
    pub entry_path: String,
    pub display_entry_rc: Option<Rc<str>>,
    pub hide_file_paths_in_output: bool,
    pub imported_module_environments: HashMap<String, Box<ImportedModuleEnvironment>>,
}

Fields§

§run_file_paths: Vec<Rc<str>>§module_name_and_path_map: HashMap<String, String>§module_path_and_names_map: HashMap<String, Vec<String>>§current_module_path: String§current_module_name: String§current_file_index: usize§entry_path: String§display_entry_rc: Option<Rc<str>>

Same Rc as the user entry slot in run_file_paths when set (file path, repl, -e, …).

§hide_file_paths_in_output: bool§imported_module_environments: HashMap<String, Box<ImportedModuleEnvironment>>

Implementations§

Source§

impl ModuleManager

Source

pub fn new_empty_module_manager(initial_path: &str) -> Self

Source

pub fn current_file_path_rc(&self) -> Rc<str>

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.