Struct rdma::mr::MemoryRegion
source · [−]pub struct MemoryRegion<T = ()>(_);
Implementations
sourceimpl<T> MemoryRegion<T>
impl<T> MemoryRegion<T>
sourcepub unsafe fn register(
pd: &ProtectionDomain,
addr: *mut u8,
length: usize,
access_flags: AccessFlags,
metadata: T
) -> Result<Self>
pub unsafe fn register(
pd: &ProtectionDomain,
addr: *mut u8,
length: usize,
access_flags: AccessFlags,
metadata: T
) -> Result<Self>
Registers a memory region associated with the protection domain pd
.
The memory region’s starting address is addr
and its size is length
.
Safety
- the memory region must be valid until it is deregistered
- the memory region must be initialized before it is read for the first time
pub fn lkey(&self) -> u32
pub fn rkey(&self) -> u32
pub fn addr_ptr(&self) -> *mut u8
pub fn addr_u64(&self) -> u64
pub fn length(&self) -> usize
pub fn metadata(&self) -> &T
Trait Implementations
sourceimpl<T: Clone> Clone for MemoryRegion<T>
impl<T: Clone> Clone for MemoryRegion<T>
sourcefn clone(&self) -> MemoryRegion<T>
fn clone(&self) -> MemoryRegion<T>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
Auto Trait Implementations
impl<T> RefUnwindSafe for MemoryRegion<T> where
T: RefUnwindSafe,
impl<T> Send for MemoryRegion<T> where
T: Send + Sync,
impl<T> Sync for MemoryRegion<T> where
T: Send + Sync,
impl<T> Unpin for MemoryRegion<T>
impl<T> UnwindSafe for MemoryRegion<T> where
T: RefUnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more