#[repr(C)]pub struct OpaqueImageVTable {
pub drop_in_place: unsafe extern "C" fn(_: VRefMut<'_, OpaqueImageVTable>) -> Layout,
pub dealloc: unsafe extern "C" fn(_: &OpaqueImageVTable, ptr: *mut u8, layout: Layout),
pub size: unsafe extern "C" fn(_: VRef<'_, OpaqueImageVTable>) -> IntSize,
pub cache_key: unsafe extern "C" fn(_: VRef<'_, OpaqueImageVTable>) -> ImageCacheKey,
}
Fields§
§drop_in_place: unsafe extern "C" fn(_: VRefMut<'_, OpaqueImageVTable>) -> Layout
§dealloc: unsafe extern "C" fn(_: &OpaqueImageVTable, ptr: *mut u8, layout: Layout)
§size: unsafe extern "C" fn(_: VRef<'_, OpaqueImageVTable>) -> IntSize
Returns the image size
cache_key: unsafe extern "C" fn(_: VRef<'_, OpaqueImageVTable>) -> ImageCacheKey
Returns a cache key
Implementations§
Source§impl OpaqueImageVTable
impl OpaqueImageVTable
Sourcepub fn new<T: OpaqueImage>() -> Self
pub fn new<T: OpaqueImage>() -> Self
Create a vtable suitable for a given type implementing the trait.
Trait Implementations§
Source§impl HasStaticVTable<OpaqueImageVTable> for NineSliceImage
impl HasStaticVTable<OpaqueImageVTable> for NineSliceImage
Source§fn static_vtable() -> &'static OpaqueImageVTable
fn static_vtable() -> &'static OpaqueImageVTable
Safety: must be a valid VTable for Self
Source§impl VTableMeta for OpaqueImageVTable
impl VTableMeta for OpaqueImageVTable
Source§type VTable = OpaqueImageVTable
type VTable = OpaqueImageVTable
That’s the VTable itself (so most likely Self)
Source§type Target = OpaqueImageTO
type Target = OpaqueImageTO
That’s the trait object that implements the functions Read more
Auto Trait Implementations§
impl Freeze for OpaqueImageVTable
impl RefUnwindSafe for OpaqueImageVTable
impl Send for OpaqueImageVTable
impl Sync for OpaqueImageVTable
impl Unpin for OpaqueImageVTable
impl UnwindSafe for OpaqueImageVTable
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