pub struct NoLoader;Expand description
A loader that resolves nothing, and says so.
The default for run, so a program using use in
a context with no packaging configured gets a typed error naming the
package — not a silently-undefined function that fails much later as an
unbound symbol pointing at innocent code.
Trait Implementations§
Source§impl Loader for NoLoader
impl Loader for NoLoader
Source§fn entry_package(&self, _path: &Path) -> Option<String>
fn entry_package(&self, _path: &Path) -> Option<String>
The bidama an ENTRY file at
path belongs to, if it belongs to one:
the package(name, …) of the Bluefile beside it. blue test bidamas/retsu/retsu.b checks and runs retsu’s own definitions, under
retsu’s namespace, exactly as an importer sees them. Read moreSource§fn needs(
&self,
_package: &str,
_entry_dir: Option<&Path>,
) -> Option<BTreeSet<String>>
fn needs( &self, _package: &str, _entry_dir: Option<&Path>, ) -> Option<BTreeSet<String>>
The bidamas
package’s Bluefile.lock records as needs (with no lock,
its Bluefile’s rows), when the loader can read it.
None when it cannot, and the check stage then has nothing to compare
the package’s use forms against (B0019). Read moreSource§fn version(&self, _package: &str, _entry_dir: Option<&Path>) -> Option<String>
fn version(&self, _package: &str, _entry_dir: Option<&Path>) -> Option<String>
Bidama
package’s Bluefile version, when the loader can read it —
what a legacy_names window is measured against.Source§fn parse(&self, src: &str) -> Result<Vec<Spanned>, ParseError>
fn parse(&self, src: &str) -> Result<Vec<Spanned>, ParseError>
The spanned tree of one source this loader handed out, or of the entry.
Resolution parses through here, so a loader that has seen a text
before (an editor’s session) can answer without parsing it again. Read more
Source§fn available(&self) -> Vec<String>
fn available(&self) -> Vec<String>
Every bidama this loader could load, by name, when it can enumerate
them: what an editor offers behind a
use the file does not have yet.fn frontend(&self, _entry: &Path) -> Option<Frontend>
Auto Trait Implementations§
impl Freeze for NoLoader
impl RefUnwindSafe for NoLoader
impl Send for NoLoader
impl Sync for NoLoader
impl Unpin for NoLoader
impl UnsafeUnpin for NoLoader
impl UnwindSafe for NoLoader
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