[][src]Trait favy::Save

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

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>(&mut self, path: &P) -> Result<&mut Self, Error> where
    P: AsRef<Path>, 

Writes the contents of the icon to disk.

Example

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

    /* Process the icon */

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

Implementors

impl Save for Favicon[src]

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

Loading content...