Struct image::codecs::dxt::DxtEncoder
source · pub struct DxtEncoder<W: Write> { /* private fields */ }
Expand description
DXT encoder
Implementations§
source§impl<W: Write> DxtEncoder<W>
impl<W: Write> DxtEncoder<W>
sourcepub fn new(w: W) -> DxtEncoder<W>
pub fn new(w: W) -> DxtEncoder<W>
Create a new encoder that writes its output to w
sourcepub fn encode(
self,
data: &[u8],
width: u32,
height: u32,
variant: DXTVariant
) -> ImageResult<()>
pub fn encode( self, data: &[u8], width: u32, height: u32, variant: DXTVariant ) -> ImageResult<()>
Encodes the image data data
that has dimensions width
and height
in DXTVariant
variant
data is assumed to be in variant.color_type()
Auto Trait Implementations§
impl<W> RefUnwindSafe for DxtEncoder<W>where
W: RefUnwindSafe,
impl<W> Send for DxtEncoder<W>where
W: Send,
impl<W> Sync for DxtEncoder<W>where
W: Sync,
impl<W> Unpin for DxtEncoder<W>where
W: Unpin,
impl<W> UnwindSafe for DxtEncoder<W>where
W: UnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more