Enum CoherencyDomain
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§
§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§
§impl Clone for CoherencyDomain
impl Clone for CoherencyDomain
§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 more§impl Debug for CoherencyDomain
impl Debug for CoherencyDomain
§impl<D> Decode<CoherencyDomain, D> for CoherencyDomainwhere
D: ResourceDialect,
impl<D> Decode<CoherencyDomain, D> for CoherencyDomainwhere
D: ResourceDialect,
§fn new_empty() -> CoherencyDomain
fn new_empty() -> CoherencyDomain
Self
. The specific value does not matter,
since it will be overwritten by decode
.§impl<D> Encode<CoherencyDomain, D> for CoherencyDomainwhere
D: ResourceDialect,
impl<D> Encode<CoherencyDomain, D> for CoherencyDomainwhere
D: ResourceDialect,
§impl Hash for CoherencyDomain
impl Hash for CoherencyDomain
§impl Ord for CoherencyDomain
impl Ord for CoherencyDomain
§impl PartialEq for CoherencyDomain
impl PartialEq for CoherencyDomain
§impl PartialOrd for CoherencyDomain
impl PartialOrd for CoherencyDomain
§impl TypeMarker for CoherencyDomain
impl TypeMarker for CoherencyDomain
§type Owned = CoherencyDomain
type Owned = CoherencyDomain
§fn inline_align(_context: Context) -> usize
fn inline_align(_context: Context) -> usize
§fn inline_size(_context: Context) -> usize
fn inline_size(_context: Context) -> usize
inline_align
.§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 more§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.§impl ValueTypeMarker for CoherencyDomain
impl ValueTypeMarker for CoherencyDomain
§type Borrowed<'a> = CoherencyDomain
type Borrowed<'a> = CoherencyDomain
Encode<Self>
type cheaply obtainable from &Self::Owned
. There are three cases: Read more§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
.