pub struct StdlibRegistry { /* private fields */ }Expand description
Registry for stdlib modules.
Implementations§
Source§impl StdlibRegistry
impl StdlibRegistry
Sourcepub fn new(config: StdlibConfig) -> Result<Self>
pub fn new(config: StdlibConfig) -> Result<Self>
Create a new stdlib registry.
Sourcepub fn default_config() -> Result<Self>
pub fn default_config() -> Result<Self>
Create with default configuration.
Sourcepub fn config(&self) -> &StdlibConfig
pub fn config(&self) -> &StdlibConfig
Get the configuration.
Sourcepub fn safety(&self) -> &SafetyConfig
pub fn safety(&self) -> &SafetyConfig
Get the safety configuration.
Sourcepub fn register_all(&self, registry: &mut HostRegistry) -> Result<()>
pub fn register_all(&self, registry: &mut HostRegistry) -> Result<()>
Register all enabled modules with a host registry.
Sourcepub fn register_process(&self, registry: &mut HostRegistry) -> Result<()>
pub fn register_process(&self, registry: &mut HostRegistry) -> Result<()>
Register the process module.
Sourcepub fn register_fs(&self, registry: &mut HostRegistry) -> Result<()>
pub fn register_fs(&self, registry: &mut HostRegistry) -> Result<()>
Register the filesystem module.
Sourcepub fn register_path(&self, registry: &mut HostRegistry) -> Result<()>
pub fn register_path(&self, registry: &mut HostRegistry) -> Result<()>
Register the path module.
Sourcepub fn register_env(&self, registry: &mut HostRegistry) -> Result<()>
pub fn register_env(&self, registry: &mut HostRegistry) -> Result<()>
Register the environment module.
Sourcepub fn register_format(&self, registry: &mut HostRegistry) -> Result<()>
pub fn register_format(&self, registry: &mut HostRegistry) -> Result<()>
Register the format module.
Sourcepub fn register_time(&self, registry: &mut HostRegistry) -> Result<()>
pub fn register_time(&self, registry: &mut HostRegistry) -> Result<()>
Register the time module.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for StdlibRegistry
impl RefUnwindSafe for StdlibRegistry
impl Send for StdlibRegistry
impl Sync for StdlibRegistry
impl Unpin for StdlibRegistry
impl UnwindSafe for StdlibRegistry
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