pub enum ExternalImageMemory {
OpaqueFd(Fd),
DmaBuf(Fd, Option<DrmFormatImageProperties>),
HostAllocation(Ptr),
HostMappedForeignMemory(Ptr),
}
Expand description
Representation of an external memory for image creation.
Variants§
OpaqueFd(Fd)
This is supported on Unix only. Same as ExternalMemoryTypeFlags::OPAQUE_FD while holding a Fd.
DmaBuf(Fd, Option<DrmFormatImageProperties>)
This is supported on Linux or Android only. Same as ExternalMemoryTypeFlags::DMA_BUF while holding a Fd.
HostAllocation(Ptr)
Same as ExternalMemoryTypeFlags::HOST_ALLOCATION while holding a Ptr.
HostMappedForeignMemory(Ptr)
Same as ExternalMemoryTypeFlags::HOST_MAPPED_FOREIGN_MEMORY while holding a Ptr.
Implementations§
Source§impl ExternalImageMemory
impl ExternalImageMemory
Sourcepub fn external_memory_type(&self) -> ExternalMemoryType
pub fn external_memory_type(&self) -> ExternalMemoryType
Get the ExternalMemoryType from this enum.
Sourcepub fn platform_memory_type(&self) -> PlatformMemoryType
pub fn platform_memory_type(&self) -> PlatformMemoryType
Get the PlatformMemoryType from this enum.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ExternalImageMemory
impl RefUnwindSafe for ExternalImageMemory
impl !Send for ExternalImageMemory
impl !Sync for ExternalImageMemory
impl Unpin for ExternalImageMemory
impl UnwindSafe for ExternalImageMemory
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