Skip to main content

Resolve

Trait Resolve 

Source
pub trait Resolve {
    // Provided methods
    fn reference(&mut self, r: &Ref, _path: &Path) -> Result<String, String> { ... }
    fn text(&mut self, t: &Text, _path: &Path) -> Result<String, String> { ... }
    fn words(&mut self, _r: &Res) -> Option<String> { ... }
}
Expand description

What a tool makes of the references and texts it reads: yog build checks each reference against the content there is and turns texts into translation keys; the IDE shows them.

Provided Methods§

Source

fn reference(&mut self, r: &Ref, _path: &Path) -> Result<String, String>

A reference: the id to keep, or why it’s wrong.

Source

fn text(&mut self, t: &Text, _path: &Path) -> Result<String, String>

A text: what to keep (its words, a translation key, …), or why it’s wrong.

Source

fn words(&mut self, _r: &Res) -> Option<String>

The words of a .yres text, if known (to check what’s in them).

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§