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<Self>
pub fn from_primitive_allow_unknown(prim: u32) -> Self
pub fn unknown() -> Self
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: ResourceDialect> Decode<CoherencyDomain, D> for CoherencyDomain
impl<D: ResourceDialect> Decode<CoherencyDomain, D> for CoherencyDomain
Source§impl<D: ResourceDialect> Encode<CoherencyDomain, D> for CoherencyDomain
impl<D: ResourceDialect> Encode<CoherencyDomain, D> for CoherencyDomain
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 moreimpl Copy for CoherencyDomain
impl Eq for CoherencyDomain
impl StructuralPartialEq for CoherencyDomain
Auto Trait Implementations§
impl Freeze for CoherencyDomain
impl RefUnwindSafe for CoherencyDomain
impl Send for CoherencyDomain
impl Sync for CoherencyDomain
impl Unpin for CoherencyDomain
impl UnwindSafe for CoherencyDomain
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)