pub struct Frame<B: ByteData> {
pub width: u32,
pub height: u32,
pub stride: u32,
pub memory_format: MemoryFormat,
pub texture: B,
pub delay: Optional<Duration>,
pub details: FrameDetails<B>,
}Fields§
§width: u32§height: u32§stride: u32Line stride
memory_format: MemoryFormat§texture: B§delay: Optional<Duration>Duration to show frame for animations.
If the value is not set, the image is not animated.
details: FrameDetails<B>Implementations§
Source§impl<B: ByteData> Frame<B>
impl<B: ByteData> Frame<B>
pub fn new( width: u32, height: u32, memory_format: MemoryFormat, texture: B, ) -> Result<Self, DimensionTooLargerError>
pub fn n_bytes(&self) -> Result<usize, DimensionTooLargerError>
pub fn into_fungible(self) -> Frame<FungibleMemory>
pub fn into_other<O: ByteData>(self) -> Result<Frame<O>, MemoryAllocationError>
pub fn desc(&self) -> String
pub async fn initial_seal(&mut self) -> Result<(), MemoryAllocationError>
pub async fn final_seal(&mut self) -> Result<(), MemoryAllocationError>
Trait Implementations§
Auto Trait Implementations§
impl<B> Freeze for Frame<B>where
B: Freeze,
impl<B> RefUnwindSafe for Frame<B>where
B: RefUnwindSafe,
impl<B> Send for Frame<B>where
B: Send,
impl<B> Sync for Frame<B>where
B: Sync,
impl<B> Unpin for Frame<B>where
B: Unpin,
impl<B> UnsafeUnpin for Frame<B>where
B: UnsafeUnpin,
impl<B> UnwindSafe for Frame<B>where
B: 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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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