Skip to main content

EfImageDescView

Struct EfImageDescView 

Source
#[repr(C)]
pub struct EfImageDescView { pub width: u64, pub height: u64, pub format: u32, pub dtype: u32, pub access: u32, pub memory: u32, pub has_memory: u32, pub compression: u32, pub has_compression: u32, }
Expand description

Flattened, #[repr(C)] view of an image-request descriptor’s fields.

ef_tensor_image_desc is opaque (handles are opaque both ways: a receiving library never dereferences, sizes, or copies one). This is the scalar block ef_tensor_image_desc_get fills instead – the same shape as ef_tensor_plane, which lets one library read a tensor it did not mint without touching the other’s private layout.

memory and compression are each a value plus an explicit presence flag rather than a sentinel: every code in ef_storage_kind (0..=6) is a real value, so there is no unused number to repurpose as “no request” without colliding with ef_storage_kind’s MEM == 0. compression is an EfCompressionRequest: Any, or Scheme for “a specific vendor scheme”, the latter not further decodable through this view – no ef_tensor_image_desc_set_* entry point can request one, so this view has never needed to carry more detail than “present, and it’s a specific one.”

Fields§

§width: u64

Requested width in pixels.

§height: u64

Requested height in pixels.

§format: u32

The requested pixel format’s wire code (PixelFormat::code()).

§dtype: u32

ef_dtype.

§access: u32

ef_cpu_access.

§memory: u32

ef_storage_kind, meaningful only when has_memory != 0.

§has_memory: u32

Non-zero when a specific memory backing was requested (None on the Rust side auto-selects).

§compression: u32

ef_compression_request, meaningful only when has_compression != 0.

§has_compression: u32

Non-zero when a compression request was made.

Trait Implementations§

Source§

impl Clone for EfImageDescView

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for EfImageDescView

Source§

impl Debug for EfImageDescView

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for EfImageDescView

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.