pub enum CoherencyDomain {
    Cpu,
    Ram,
    Inaccessible,
    // some variants omitted
}Expand description
INACCESSIBLE is only for cases where there is no CPU access to the
buffers.
Device-local memory that isn’t reachable from the CPU is CoherencyDomain
INACCESSIBLE, even if it’s possible to cause a device (physical or
virtual) to copy the data from the INACCESSIBLE buffers to buffers that
are visible to the CPU. In other words, INACCESSIBLE does not imply secure,
but secure implies INACCESSIBLE.
CPU means producers must ensure that a consumer can read the produced data
with the CPU without the consumer needing to do additional cache ops not
already performed (as needed) by the producer.
RAM means producers must ensure that the produced data is entirely present
in RAM, without any dirty CPU cache lines, and a consumer must invalidate
(or flush and invalidate, typically) the CPU cache before reading data with
the CPU. The RAM domain can be faster than the CPU domain when all
access is via HW DMA, since in that case no CPU cache ops are required,
since no participant is actually reading/writing using the CPU.
Variants§
Implementations§
Source§impl CoherencyDomain
 
impl CoherencyDomain
pub fn from_primitive(prim: u32) -> Option<CoherencyDomain>
pub fn from_primitive_allow_unknown(prim: u32) -> CoherencyDomain
pub fn unknown() -> CoherencyDomain
pub const fn into_primitive(self) -> u32
pub fn is_unknown(&self) -> bool
Trait Implementations§
Source§impl Clone for CoherencyDomain
 
impl Clone for CoherencyDomain
Source§fn clone(&self) -> CoherencyDomain
 
fn clone(&self) -> CoherencyDomain
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
 
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for CoherencyDomain
 
impl Debug for CoherencyDomain
Source§impl<D> Decode<CoherencyDomain, D> for CoherencyDomainwhere
    D: ResourceDialect,
 
impl<D> Decode<CoherencyDomain, D> for CoherencyDomainwhere
    D: ResourceDialect,
Source§fn new_empty() -> CoherencyDomain
 
fn new_empty() -> CoherencyDomain
Self. The specific value does not matter,
since it will be overwritten by decode.Source§impl<D> Encode<CoherencyDomain, D> for CoherencyDomainwhere
    D: ResourceDialect,
 
impl<D> Encode<CoherencyDomain, D> for CoherencyDomainwhere
    D: ResourceDialect,
Source§impl Hash for CoherencyDomain
 
impl Hash for CoherencyDomain
Source§impl Ord for CoherencyDomain
 
impl Ord for CoherencyDomain
Source§fn cmp(&self, other: &CoherencyDomain) -> Ordering
 
fn cmp(&self, other: &CoherencyDomain) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
    Self: Sized,
 
fn max(self, other: Self) -> Selfwhere
    Self: Sized,
Source§impl PartialEq for CoherencyDomain
 
impl PartialEq for CoherencyDomain
Source§impl PartialOrd for CoherencyDomain
 
impl PartialOrd for CoherencyDomain
Source§impl TypeMarker for CoherencyDomain
 
impl TypeMarker for CoherencyDomain
Source§type Owned = CoherencyDomain
 
type Owned = CoherencyDomain
Source§fn inline_align(_context: Context) -> usize
 
fn inline_align(_context: Context) -> usize
Source§fn inline_size(_context: Context) -> usize
 
fn inline_size(_context: Context) -> usize
inline_align.Source§fn encode_is_copy() -> bool
 
fn encode_is_copy() -> bool
Self::Owned matches the FIDL wire
format and encoding requires no validation. When true, we can optimize
encoding arrays and vectors of Self::Owned to a single memcpy. Read moreSource§fn decode_is_copy() -> bool
 
fn decode_is_copy() -> bool
Self::Owned matches the FIDL wire
format and decoding requires no validation. When true, we can optimize
decoding arrays and vectors of Self::Owned to a single memcpy.Source§impl ValueTypeMarker for CoherencyDomain
 
impl ValueTypeMarker for CoherencyDomain
Source§type Borrowed<'a> = CoherencyDomain
 
type Borrowed<'a> = CoherencyDomain
Encode<Self>
type cheaply obtainable from &Self::Owned. There are three cases: Read moreSource§fn borrow(
    value: &<CoherencyDomain as TypeMarker>::Owned,
) -> <CoherencyDomain as ValueTypeMarker>::Borrowed<'_>
 
fn borrow( value: &<CoherencyDomain as TypeMarker>::Owned, ) -> <CoherencyDomain as ValueTypeMarker>::Borrowed<'_>
&Self::Owned to Self::Borrowed.