Skip to main content

Texts

Trait Texts 

Source
pub trait Texts {
    // Required method
    fn text(&self, path: &str) -> Result<Option<String>, String>;
}
Expand description

Where load_json finds a file’s text: in the CLI, relative to the directory it runs in.

Required Methods§

Source

fn text(&self, path: &str) -> Result<Option<String>, String>

Ok(None) is no file there; Err is one that could not be read as text.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§