Trait koto_runtime::KotoRead
source · pub trait KotoRead {
// Provided methods
fn read_line(&self) -> Result<Option<String>> { ... }
fn read_to_string(&self) -> Result<String> { ... }
}
Expand description
A trait that defines the read operations of a KotoFile
Provided Methods§
sourcefn read_line(&self) -> Result<Option<String>>
fn read_line(&self) -> Result<Option<String>>
Returns the next line from the file, including any newline characters
If None is returned then the end of the file has been reached.
sourcefn read_to_string(&self) -> Result<String>
fn read_to_string(&self) -> Result<String>
Returns the contents of the file from the current position