#[repr(C)]pub struct SharedRawImageData {
pub data: *const U8Vec,
pub copies: *const AtomicUsize,
pub run_destructor: bool,
}Expand description
Reference-counted wrapper around raw image bytes (U8Vec). This allows sharing image data between azul-core and webrender without cloning.
Similar to ImageRef but specifically for raw byte data, avoiding the overhead of the full DecodedImage enum when we just need the bytes.
Fields§
§data: *const U8VecShared pointer to the raw image bytes
copies: *const AtomicUsizeReference counter - when it reaches 0, the data is deallocated
run_destructor: boolWhether to run the destructor (for FFI safety)
Implementations§
Sourcepub fn into_inner(self) -> Option<U8Vec>
pub fn into_inner(self) -> Option<U8Vec>
Try to extract the U8Vec if this is the only reference Returns None if there are other references
Trait Implementations§
Auto Trait Implementations§
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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