Trait amfnbatchlib::IOAdapterTrait[]

pub trait IOAdapterTrait {
    fn read(&self, location: &str) -> Result<String, ErrorType>;
fn write(&self, location: &str, text: &str) -> Result<(), ErrorType>; }

The batch traits. Common trait for all I/O adapters.

Required methods

fn read(&self, location: &str) -> Result<String, ErrorType>

Read input from a location.

Arguments

  • location - The location to read.

Return

  • The input string or an error code.

fn write(&self, location: &str, text: &str) -> Result<(), ErrorType>

Write output to a location.

Arguments

  • location - The location to write.
  • text - The text to write.

Return

  • ERROR_NONE or an error code.
Loading content...

Implementors

Loading content...