BifIO

Trait BifIO 

Source
pub trait BifIO {
    // Required methods
    fn from_bif(bif: &str) -> Self;
    fn to_bif(&self) -> String;
    fn read_bif(path: &str) -> Self;
    fn write_bif(&self, path: &str);
}
Expand description

A trait for reading and writing BIF files.

Required Methods§

Source

fn from_bif(bif: &str) -> Self

Create an instance of the type from a BIF string.

§Arguments
  • bif - A string slice that holds the BIF data.
§Returns

A new instance of the type.

Source

fn to_bif(&self) -> String

Convert the instance to a BIF string.

§Returns

A string slice that holds the BIF data.

Source

fn read_bif(path: &str) -> Self

Read a BIF file and create an instance of the type.

§Arguments
  • path - A string slice that holds the path to the BIF file.
§Returns

A new instance of the type.

Source

fn write_bif(&self, path: &str)

Write the instance to a BIF file.

§Arguments
  • path - A string slice that holds the path to the BIF file.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§