Struct async_rdma::LocalMr
source · pub struct LocalMr { /* private fields */ }
Expand description
Local Memory Region
Implementations§
source§impl LocalMr
impl LocalMr
sourcepub fn get(&self, i: Range<usize>) -> Option<LocalMrSlice<'_>>
pub fn get(&self, i: Range<usize>) -> Option<LocalMrSlice<'_>>
Get a local mr slice
Return None
if the inputed range is wrong
sourcepub unsafe fn get_unchecked(&self, i: Range<usize>) -> LocalMrSlice<'_>
pub unsafe fn get_unchecked(&self, i: Range<usize>) -> LocalMrSlice<'_>
Get an unchecked local mr slice
Safety
Callers of this function are responsible that these preconditions are satisfied:
- The starting index must not exceed the ending index;
- Indexes must be within bounds of the original
LocalMr
.
sourcepub fn get_mut(&mut self, i: Range<usize>) -> Option<LocalMrSliceMut<'_>>
pub fn get_mut(&mut self, i: Range<usize>) -> Option<LocalMrSliceMut<'_>>
Get a mutable local mr slice
Return None
if the inputed range is wrong
sourcepub unsafe fn get_unchecked_mut(
&mut self,
i: Range<usize>
) -> LocalMrSliceMut<'_>
pub unsafe fn get_unchecked_mut(
&mut self,
i: Range<usize>
) -> LocalMrSliceMut<'_>
Get an unchecked mutable local mr slice
Safety
Callers of this function are responsible that these preconditions are satisfied:
- The starting index must not exceed the ending index;
- Indexes must be within bounds of the original
LocalMr
.
Trait Implementations§
source§impl LocalMrReadAccess for &LocalMr
impl LocalMrReadAccess for &LocalMr
source§fn as_ptr(&self) -> MappedRwLockReadGuard<'_, *const u8>
fn as_ptr(&self) -> MappedRwLockReadGuard<'_, *const u8>
Get the start pointer until it is readable Read more
source§fn try_as_ptr(&self) -> Option<MappedRwLockReadGuard<'_, *const u8>>
fn try_as_ptr(&self) -> Option<MappedRwLockReadGuard<'_, *const u8>>
Try to get the start pointer Read more
source§fn as_slice(&self) -> MappedRwLockReadGuard<'_, &[u8]>
fn as_slice(&self) -> MappedRwLockReadGuard<'_, &[u8]>
Get the memory region as slice until it is readable Read more
source§fn try_as_slice(&self) -> Option<MappedRwLockReadGuard<'_, &[u8]>>
fn try_as_slice(&self) -> Option<MappedRwLockReadGuard<'_, &[u8]>>
Try to get the memory region as slice Read more
source§unsafe fn as_slice_unchecked(&self) -> &[u8] ⓘ
unsafe fn as_slice_unchecked(&self) -> &[u8] ⓘ
Get the memory region as slice without lock Read more
source§unsafe fn lkey_unchecked(&self) -> u32
unsafe fn lkey_unchecked(&self) -> u32
Get the local key without lock Read more
source§unsafe fn rkey_unchecked(&self) -> u32
unsafe fn rkey_unchecked(&self) -> u32
Get the remote key without lock Read more
source§fn token_with_timeout(&self, timeout: Duration) -> Option<MrToken>
fn token_with_timeout(&self, timeout: Duration) -> Option<MrToken>
New a token with specified timeout
source§unsafe fn token_with_timeout_unchecked(
&self,
timeout: Duration
) -> Option<MrToken>
unsafe fn token_with_timeout_unchecked(
&self,
timeout: Duration
) -> Option<MrToken>
New a token with specified timeout with
rkey_unchecked
Read moresource§fn is_readable(&self) -> bool
fn is_readable(&self) -> bool
Is the corresponding
RwLocalMrInner
readable?source§fn read_inner(&self) -> RwLockReadGuard<'_, LocalMrInner>
fn read_inner(&self) -> RwLockReadGuard<'_, LocalMrInner>
Get read lock of
LocalMrInenr
source§impl LocalMrReadAccess for LocalMr
impl LocalMrReadAccess for LocalMr
source§fn as_ptr(&self) -> MappedRwLockReadGuard<'_, *const u8>
fn as_ptr(&self) -> MappedRwLockReadGuard<'_, *const u8>
Get the start pointer until it is readable Read more
source§fn try_as_ptr(&self) -> Option<MappedRwLockReadGuard<'_, *const u8>>
fn try_as_ptr(&self) -> Option<MappedRwLockReadGuard<'_, *const u8>>
Try to get the start pointer Read more
source§fn as_slice(&self) -> MappedRwLockReadGuard<'_, &[u8]>
fn as_slice(&self) -> MappedRwLockReadGuard<'_, &[u8]>
Get the memory region as slice until it is readable Read more
source§fn try_as_slice(&self) -> Option<MappedRwLockReadGuard<'_, &[u8]>>
fn try_as_slice(&self) -> Option<MappedRwLockReadGuard<'_, &[u8]>>
Try to get the memory region as slice Read more
source§unsafe fn as_slice_unchecked(&self) -> &[u8] ⓘ
unsafe fn as_slice_unchecked(&self) -> &[u8] ⓘ
Get the memory region as slice without lock Read more
source§unsafe fn lkey_unchecked(&self) -> u32
unsafe fn lkey_unchecked(&self) -> u32
Get the local key without lock Read more
source§unsafe fn rkey_unchecked(&self) -> u32
unsafe fn rkey_unchecked(&self) -> u32
Get the remote key without lock Read more
source§fn token_with_timeout(&self, timeout: Duration) -> Option<MrToken>
fn token_with_timeout(&self, timeout: Duration) -> Option<MrToken>
New a token with specified timeout
source§unsafe fn token_with_timeout_unchecked(
&self,
timeout: Duration
) -> Option<MrToken>
unsafe fn token_with_timeout_unchecked(
&self,
timeout: Duration
) -> Option<MrToken>
New a token with specified timeout with
rkey_unchecked
Read moresource§fn is_readable(&self) -> bool
fn is_readable(&self) -> bool
Is the corresponding
RwLocalMrInner
readable?source§fn read_inner(&self) -> RwLockReadGuard<'_, LocalMrInner>
fn read_inner(&self) -> RwLockReadGuard<'_, LocalMrInner>
Get read lock of
LocalMrInenr
source§impl LocalMrWriteAccess for LocalMr
impl LocalMrWriteAccess for LocalMr
source§fn as_mut_ptr(&mut self) -> MappedRwLockWriteGuard<'_, *mut u8>
fn as_mut_ptr(&mut self) -> MappedRwLockWriteGuard<'_, *mut u8>
Get the mutable start pointer until it is writeable Read more
source§fn try_as_mut_ptr(&self) -> Option<MappedRwLockWriteGuard<'_, *mut u8>>
fn try_as_mut_ptr(&self) -> Option<MappedRwLockWriteGuard<'_, *mut u8>>
Try to get the mutable start pointer Read more
source§fn as_mut_ptr_unchecked(&mut self) -> *mut u8
fn as_mut_ptr_unchecked(&mut self) -> *mut u8
Get the memory region start mut addr without lock Read more
source§fn as_mut_slice(&mut self) -> MappedRwLockWriteGuard<'_, &mut [u8]>
fn as_mut_slice(&mut self) -> MappedRwLockWriteGuard<'_, &mut [u8]>
Get the memory region as mutable slice until it is writeable Read more
source§fn try_as_mut_slice(&mut self) -> Option<MappedRwLockWriteGuard<'_, &mut [u8]>>
fn try_as_mut_slice(&mut self) -> Option<MappedRwLockWriteGuard<'_, &mut [u8]>>
Try to get the memory region as mutable slice Read more
source§unsafe fn as_mut_slice_unchecked(&mut self) -> &mut [u8] ⓘ
unsafe fn as_mut_slice_unchecked(&mut self) -> &mut [u8] ⓘ
Get the memory region as mut slice without lock Read more
source§fn is_writeable(&self) -> bool
fn is_writeable(&self) -> bool
Is the corresponding
RwLocalMrInner
writeable?source§fn write_inner(&self) -> RwLockWriteGuard<'_, LocalMrInner>
fn write_inner(&self) -> RwLockWriteGuard<'_, LocalMrInner>
Get write lock of
LocalMrInenr