Skip to main content

NoLoader

Struct NoLoader 

Source
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

Source§

fn load(&self, name: &str) -> Result<Vec<(String, String)>, String>

The .b sources of name, as (label, source) pairs. Read more
Source§

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 more
Source§

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 more
Source§

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>

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>

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.
Source§

fn frontend(&self, _entry: &Path) -> Option<Frontend>

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> Same for T

Source§

type Output = T

Should always be Self
Source§

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

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

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.