#[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§
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
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