Trait SaveSurface

pub trait SaveSurface {
    // Required methods
    fn save<P>(&self, filename: P) -> Result<(), String> 
       where P: AsRef<Path>;
    fn save_rw(&self, dst: &mut RWops<'_>) -> Result<(), String> ;
}
Available on crate feature dep_sdl2 only.
Expand description

Method extensions to Surface for saving to disk

Required Methods§

fn save<P>(&self, filename: P) -> Result<(), String>
where P: AsRef<Path>,

fn save_rw(&self, dst: &mut RWops<'_>) -> Result<(), String>

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§

§

impl<'a> SaveSurface for Surface<'a>