Skip to main content

ExportObject

Trait ExportObject 

Source
pub trait ExportObject {
    // Required methods
    fn export_to_buffer(&mut self, buffer: &mut Vec<u8>);
    fn extension(&self) -> impl AsRef<str>;

    // Provided methods
    fn export_to_file(&mut self) { ... }
    fn filename(&self) -> impl AsRef<str> { ... }
}

Required Methods§

Source

fn export_to_buffer(&mut self, buffer: &mut Vec<u8>)

Export contents to a Vec<u8> buffer, with optional parameters

Source

fn extension(&self) -> impl AsRef<str>

The extension name with the dot

Provided Methods§

Source

fn export_to_file(&mut self)

Export contents and save them on disk, with optional parameters

Source

fn filename(&self) -> impl AsRef<str>

the filename

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§

Source§

impl<'a> ExportObject for Graphviz<'a>

Source§

impl<'a> ExportObject for OuDia<'a>