TextureExt

Trait TextureExt 

Source
pub trait TextureExt: IsA<Texture> + 'static {
    // Provided methods
    fn color_state(&self) -> ColorState { ... }
    fn format(&self) -> MemoryFormat { ... }
    fn height(&self) -> i32 { ... }
    fn width(&self) -> i32 { ... }
    fn save_to_png(&self, filename: impl AsRef<Path>) -> Result<(), BoolError> { ... }
    fn save_to_png_bytes(&self) -> Bytes { ... }
    fn save_to_tiff(&self, filename: impl AsRef<Path>) -> Result<(), BoolError> { ... }
    fn save_to_tiff_bytes(&self) -> Bytes { ... }
}

Provided Methods§

Source

fn color_state(&self) -> ColorState

Available on crate feature v4_16 only.
Source

fn format(&self) -> MemoryFormat

Available on crate feature v4_10 only.
Source

fn height(&self) -> i32

Source

fn width(&self) -> i32

Source

fn save_to_png(&self, filename: impl AsRef<Path>) -> Result<(), BoolError>

Source

fn save_to_png_bytes(&self) -> Bytes

Available on crate feature v4_6 only.
Source

fn save_to_tiff(&self, filename: impl AsRef<Path>) -> Result<(), BoolError>

Available on crate feature v4_6 only.
Source

fn save_to_tiff_bytes(&self) -> Bytes

Available on crate feature v4_6 only.

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§