pub struct SendWorkRequest<'wr, 'data> { /* private fields */ }Expand description
A request to send data to a remote peer.
In a Send operation, the local node pushes data to a remote node. The remote node must
have posted a corresponding ReceiveWorkRequest to accept the data.
§Lifetimes
'wr— The lifetime of this struct. It must live until the request is posted to the Queue Pair.'data— The lifetime of the local data buffer. It is tied to theGatherElementand must remain valid until the operation completes.
Implementations§
Source§impl<'wr, 'data> SendWorkRequest<'wr, 'data>
impl<'wr, 'data> SendWorkRequest<'wr, 'data>
Sourcepub fn new(gather_elements: &'wr [GatherElement<'data>]) -> Self
pub fn new(gather_elements: &'wr [GatherElement<'data>]) -> Self
Creates a new Send request using the provided list of gather elements.
Sourcepub fn with_immediate(self, imm_data: u32) -> Self
pub fn with_immediate(self, imm_data: u32) -> Self
Attach immediate data (a 32-bit integer) to the operation.
Sourcepub fn only_immediate(imm_data: u32) -> Self
pub fn only_immediate(imm_data: u32) -> Self
Creates a new Send request containing only immediate data (0-byte payload).
Trait Implementations§
Source§impl<'wr, 'data> Clone for SendWorkRequest<'wr, 'data>
impl<'wr, 'data> Clone for SendWorkRequest<'wr, 'data>
Source§fn clone(&self) -> SendWorkRequest<'wr, 'data>
fn clone(&self) -> SendWorkRequest<'wr, 'data>
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<'wr, 'data> Debug for SendWorkRequest<'wr, 'data>
impl<'wr, 'data> Debug for SendWorkRequest<'wr, 'data>
Source§impl<'wr, 'data> From<PeerSendWorkRequest<'wr, 'data>> for SendWorkRequest<'wr, 'data>
impl<'wr, 'data> From<PeerSendWorkRequest<'wr, 'data>> for SendWorkRequest<'wr, 'data>
Source§fn from(value: PeerSendWorkRequest<'wr, 'data>) -> Self
fn from(value: PeerSendWorkRequest<'wr, 'data>) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl<'wr, 'data> Freeze for SendWorkRequest<'wr, 'data>
impl<'wr, 'data> RefUnwindSafe for SendWorkRequest<'wr, 'data>
impl<'wr, 'data> Send for SendWorkRequest<'wr, 'data>
impl<'wr, 'data> Sync for SendWorkRequest<'wr, 'data>
impl<'wr, 'data> Unpin for SendWorkRequest<'wr, 'data>
impl<'wr, 'data> UnsafeUnpin for SendWorkRequest<'wr, 'data>
impl<'wr, 'data> UnwindSafe for SendWorkRequest<'wr, 'data>
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