pub struct Texture<const USAGE: u32 = DEFAULT_USAGE> { /* private fields */ }Implementations§
Source§impl<const USAGE: u32> Texture<USAGE>
impl<const USAGE: u32> Texture<USAGE>
pub fn new(target: &Target, format: TextureFormat, dim: Rect) -> Self
pub fn new_rgba(target: &Target, dim: Rect) -> Self
pub fn new_rgba_with(target: &Target, data: &RgbaImage) -> Self
pub fn new_grey(target: &Target, dim: Rect) -> Self
pub fn new_grey_with(target: &Target, data: &GrayImage) -> Self
pub fn new_format(target: &Target, dim: Rect, format: TextureFormat) -> Self
pub fn get_dim(&self) -> Rect
pub fn get_format(&self) -> TextureFormat
pub fn write( &self, target: &Target, spot: PositionedRect, image: DynamicImage, ) -> Result<(), &'static str>
pub async fn read(&self, target: &Target) -> DynamicImage
Trait Implementations§
Auto Trait Implementations§
impl<const USAGE: u32> Freeze for Texture<USAGE>
impl<const USAGE: u32 = DEFAULT_USAGE> !RefUnwindSafe for Texture<USAGE>
impl<const USAGE: u32> Send for Texture<USAGE>
impl<const USAGE: u32> Sync for Texture<USAGE>
impl<const USAGE: u32> Unpin for Texture<USAGE>
impl<const USAGE: u32 = DEFAULT_USAGE> !UnwindSafe for Texture<USAGE>
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more