pub struct StdlibCatalog {
pub sources: &'static [StdlibSource],
pub prompt_assets: &'static [StdlibPromptAsset],
pub cli_scripts: &'static [StdlibCliScript],
}Expand description
Every embedded stdlib source a host provides.
Fields§
§sources: &'static [StdlibSource]§prompt_assets: &'static [StdlibPromptAsset]§cli_scripts: &'static [StdlibCliScript]Implementations§
Source§impl StdlibCatalog
impl StdlibCatalog
Sourcepub fn source(&self, module: &str) -> Option<&'static str>
pub fn source(&self, module: &str) -> Option<&'static str>
The source of std/<module>, or None when no such module exists.
Sourcepub fn prompt_asset(&self, path: &str) -> Option<&'static str>
pub fn prompt_asset(&self, path: &str) -> Option<&'static str>
The prompt template at path, with or without its std/ prefix.
Sourcepub fn cli_script(&self, name: &str) -> Option<&'static str>
pub fn cli_script(&self, name: &str) -> Option<&'static str>
The CLI subcommand script registered under name.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for StdlibCatalog
impl RefUnwindSafe for StdlibCatalog
impl Send for StdlibCatalog
impl Sync for StdlibCatalog
impl Unpin for StdlibCatalog
impl UnsafeUnpin for StdlibCatalog
impl UnwindSafe for StdlibCatalog
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