pub struct ProtectionDomain { /* private fields */ }Expand description
An RDMA Protection Domain (ibv_pd).
All memory registrations and QPs belong to a PD.
Implementations§
Source§impl ProtectionDomain
impl ProtectionDomain
Sourcepub unsafe fn from_raw(pd: *mut ibv_pd, ctx: Arc<Context>) -> Arc<Self>
pub unsafe fn from_raw(pd: *mut ibv_pd, ctx: Arc<Context>) -> Arc<Self>
Wrap a raw ibv_pd pointer.
§Safety
The pointer must be valid and the caller must ensure ctx is the
correct parent context.
Sourcepub fn reg_mr<'a>(
self: &Arc<Self>,
buf: &'a mut [u8],
access: AccessFlags,
) -> Result<MemoryRegion<'a>>
pub fn reg_mr<'a>( self: &Arc<Self>, buf: &'a mut [u8], access: AccessFlags, ) -> Result<MemoryRegion<'a>>
Register a borrowed memory region.
The returned MemoryRegion borrows buf and keeps self alive via Arc.
Sourcepub fn reg_mr_owned(
self: &Arc<Self>,
buf: Vec<u8>,
access: AccessFlags,
) -> Result<OwnedMemoryRegion>
pub fn reg_mr_owned( self: &Arc<Self>, buf: Vec<u8>, access: AccessFlags, ) -> Result<OwnedMemoryRegion>
Register an owned memory region.
The buffer is moved into the OwnedMemoryRegion and freed when it is dropped.
Sourcepub fn create_qp(
self: &Arc<Self>,
send_cq: &Arc<CompletionQueue>,
recv_cq: &Arc<CompletionQueue>,
init_attr: &QpInitAttr,
) -> Result<QueuePair>
pub fn create_qp( self: &Arc<Self>, send_cq: &Arc<CompletionQueue>, recv_cq: &Arc<CompletionQueue>, init_attr: &QpInitAttr, ) -> Result<QueuePair>
Create a Queue Pair on this PD.
Trait Implementations§
Source§impl Drop for ProtectionDomain
impl Drop for ProtectionDomain
impl Send for ProtectionDomain
impl Sync for ProtectionDomain
Auto Trait Implementations§
impl Freeze for ProtectionDomain
impl RefUnwindSafe for ProtectionDomain
impl Unpin for ProtectionDomain
impl UnsafeUnpin for ProtectionDomain
impl UnwindSafe for ProtectionDomain
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