Struct async_rdma::LocalMr
source · [−]pub struct LocalMr { /* private fields */ }
Expand description
Local Memory Region
Implementations
sourceimpl 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
sourceimpl LocalMrReadAccess for &LocalMr
impl LocalMrReadAccess for &LocalMr
sourcefn as_ptr(&self) -> MappedRwLockReadGuard<'_, *const u8>
fn as_ptr(&self) -> MappedRwLockReadGuard<'_, *const u8>
Get the start pointer until it is readable Read more
sourcefn 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
sourcefn as_ptr_unchecked(&self) -> *const u8
fn as_ptr_unchecked(&self) -> *const u8
Get the start pointer without lock Read more
sourcefn as_slice(&self) -> MappedRwLockReadGuard<'_, &[u8]>
fn as_slice(&self) -> MappedRwLockReadGuard<'_, &[u8]>
Get the memory region as slice until it is readable Read more
sourcefn 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
sourceunsafe fn as_slice_unchecked(&self) -> &[u8]ⓘNotable traits for &[u8]impl Read for &[u8]impl Write for &mut [u8]
unsafe fn as_slice_unchecked(&self) -> &[u8]ⓘNotable traits for &[u8]impl Read for &[u8]impl Write for &mut [u8]
Get the memory region as slice without lock Read more
sourceunsafe fn lkey_unchecked(&self) -> u32
unsafe fn lkey_unchecked(&self) -> u32
Get the local key without lock Read more
sourceunsafe fn rkey_unchecked(&self) -> u32
unsafe fn rkey_unchecked(&self) -> u32
Get the remote key without lock Read more
sourcefn token_with_timeout(&self, timeout: Duration) -> Option<MrToken>
fn token_with_timeout(&self, timeout: Duration) -> Option<MrToken>
New a token with specified timeout
sourceunsafe 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 more
sourcefn is_readable(&self) -> bool
fn is_readable(&self) -> bool
Is the corresponding RwLocalMrInner
readable?
sourcefn read_inner(&self) -> RwLockReadGuard<'_, LocalMrInner>
fn read_inner(&self) -> RwLockReadGuard<'_, LocalMrInner>
Get read lock of LocalMrInenr
sourceimpl LocalMrReadAccess for LocalMr
impl LocalMrReadAccess for LocalMr
sourcefn as_ptr(&self) -> MappedRwLockReadGuard<'_, *const u8>
fn as_ptr(&self) -> MappedRwLockReadGuard<'_, *const u8>
Get the start pointer until it is readable Read more
sourcefn 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
sourcefn as_ptr_unchecked(&self) -> *const u8
fn as_ptr_unchecked(&self) -> *const u8
Get the start pointer without lock Read more
sourcefn as_slice(&self) -> MappedRwLockReadGuard<'_, &[u8]>
fn as_slice(&self) -> MappedRwLockReadGuard<'_, &[u8]>
Get the memory region as slice until it is readable Read more
sourcefn 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
sourceunsafe fn as_slice_unchecked(&self) -> &[u8]ⓘNotable traits for &[u8]impl Read for &[u8]impl Write for &mut [u8]
unsafe fn as_slice_unchecked(&self) -> &[u8]ⓘNotable traits for &[u8]impl Read for &[u8]impl Write for &mut [u8]
Get the memory region as slice without lock Read more
sourceunsafe fn lkey_unchecked(&self) -> u32
unsafe fn lkey_unchecked(&self) -> u32
Get the local key without lock Read more
sourceunsafe fn rkey_unchecked(&self) -> u32
unsafe fn rkey_unchecked(&self) -> u32
Get the remote key without lock Read more
sourcefn token_with_timeout(&self, timeout: Duration) -> Option<MrToken>
fn token_with_timeout(&self, timeout: Duration) -> Option<MrToken>
New a token with specified timeout
sourceunsafe 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 more
sourcefn is_readable(&self) -> bool
fn is_readable(&self) -> bool
Is the corresponding RwLocalMrInner
readable?
sourcefn read_inner(&self) -> RwLockReadGuard<'_, LocalMrInner>
fn read_inner(&self) -> RwLockReadGuard<'_, LocalMrInner>
Get read lock of LocalMrInenr
sourceimpl LocalMrWriteAccess for LocalMr
impl LocalMrWriteAccess for LocalMr
sourcefn 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
sourcefn 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
sourcefn 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
sourcefn 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
sourcefn 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
sourceunsafe fn as_mut_slice_unchecked(&mut self) -> &mut [u8]ⓘNotable traits for &[u8]impl Read for &[u8]impl Write for &mut [u8]
unsafe fn as_mut_slice_unchecked(&mut self) -> &mut [u8]ⓘNotable traits for &[u8]impl Read for &[u8]impl Write for &mut [u8]
Get the memory region as mut slice without lock Read more
sourcefn is_writeable(&self) -> bool
fn is_writeable(&self) -> bool
Is the corresponding RwLocalMrInner
writeable?
sourcefn write_inner(&self) -> RwLockWriteGuard<'_, LocalMrInner>
fn write_inner(&self) -> RwLockWriteGuard<'_, LocalMrInner>
Get write lock of LocalMrInenr
Auto Trait Implementations
impl !RefUnwindSafe for LocalMr
impl Send for LocalMr
impl Sync for LocalMr
impl Unpin for LocalMr
impl !UnwindSafe for LocalMr
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
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
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
impl<V, T> VZip<V> for Twhere
V: MultiLane<T>,
impl<V, T> VZip<V> for Twhere
V: MultiLane<T>,
fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more