[][src]Trait ikon::encode::Save

pub trait Save: Encode {
    fn save<P: AsRef<Path>>(&mut self, path: &P) -> Result<&mut Self>;
}

The Save trait provides functionality for saving the contents of an Encode to the local file system.

Usefull for icon formats such as favicon.

Required methods

fn save<P: AsRef<Path>>(&mut self, path: &P) -> Result<&mut Self>

Writes the contents of the icon to disk.

Example

use ikon::encode::{Encode, Save};
  
fn main() -> io::Result<()> {
    let family = IconFamily::new();

    /* Process the icon family */

    family.save("./output/")
}
Loading content...

Implementors

impl<T: Write> Save for T[src]

Loading content...