#[non_exhaustive]pub struct PlacementAcceptance { /* private fields */ }Expand description
A bitfield describing which memory classes a port can accept zero-copy.
Implementations§
Source§impl PlacementAcceptance
impl PlacementAcceptance
Sourcepub const fn contains(self, other: Self) -> bool
pub const fn contains(self, other: Self) -> bool
Superset test: does self include every class in other?
Sourcepub const fn with_pinned_host(self) -> Self
pub const fn with_pinned_host(self) -> Self
Accept pinned host memory.
Sourcepub const fn with_device(self, ordinal: u8) -> Self
pub const fn with_device(self, ordinal: u8) -> Self
Accept a specific device ordinal (0..=15).
Sourcepub const fn try_with_device(self, ordinal: u8) -> Option<Self>
pub const fn try_with_device(self, ordinal: u8) -> Option<Self>
Like with_device but returns None if the ordinal is out of range.
Sourcepub const fn with_all_devices(self) -> Self
pub const fn with_all_devices(self) -> Self
Accept all supported device ordinals (0..=15).
Accept shared memory regions.
Sourcepub const fn accepts(&self, class: MemoryClass) -> bool
pub const fn accepts(&self, class: MemoryClass) -> bool
Test whether the given memory class is accepted without copy.
Sourcepub const fn exactly(class: MemoryClass) -> Self
pub const fn exactly(class: MemoryClass) -> Self
Convenience: build an acceptance set that accepts exactly one class.
Trait Implementations§
Source§impl Clone for PlacementAcceptance
impl Clone for PlacementAcceptance
Source§fn clone(&self) -> PlacementAcceptance
fn clone(&self) -> PlacementAcceptance
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PlacementAcceptance
impl Debug for PlacementAcceptance
Source§impl Default for PlacementAcceptance
impl Default for PlacementAcceptance
Source§impl PartialEq for PlacementAcceptance
impl PartialEq for PlacementAcceptance
impl Copy for PlacementAcceptance
impl Eq for PlacementAcceptance
impl StructuralPartialEq for PlacementAcceptance
Auto Trait Implementations§
impl Freeze for PlacementAcceptance
impl RefUnwindSafe for PlacementAcceptance
impl Send for PlacementAcceptance
impl Sync for PlacementAcceptance
impl Unpin for PlacementAcceptance
impl UnsafeUnpin for PlacementAcceptance
impl UnwindSafe for PlacementAcceptance
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