pub struct RdmaAction { /* private fields */ }Expand description
A batch of RDMA operations submitted as a single unit.
RdmaAction is a builder that accumulates read-into-local and
write-from-local ops, checking each op’s sizes as it is added, and then
runs them concurrently across the available backends on
Self::submit.
Overlap between the queued ops’ memory ranges is not tracked, on either the local or the remote side. Two ops in one action that write the same range race, and it is the caller’s job not to queue them.
Implementations§
Source§impl RdmaAction
impl RdmaAction
pub fn new() -> Self
Sourcepub fn add_read_into_local(
&mut self,
remote: RdmaRemoteBuffer,
local: KeepaliveLocalMemory,
) -> Result<&mut Self, Error>
pub fn add_read_into_local( &mut self, remote: RdmaRemoteBuffer, local: KeepaliveLocalMemory, ) -> Result<&mut Self, Error>
Queue a read from remote into local.
Sourcepub fn add_write_from_local(
&mut self,
remote: RdmaRemoteBuffer,
local: KeepaliveLocalMemory,
) -> Result<&mut Self, Error>
pub fn add_write_from_local( &mut self, remote: RdmaRemoteBuffer, local: KeepaliveLocalMemory, ) -> Result<&mut Self, Error>
Queue a write from local into remote.
Sourcepub async fn submit(
&mut self,
client: &(impl Actor + Send + Sync),
timeout: Duration,
) -> Result<(), Error>
pub async fn submit( &mut self, client: &(impl Actor + Send + Sync), timeout: Duration, ) -> Result<(), Error>
Submit all queued ops. Ops are grouped by backend and each group is submitted in parallel. Safe to call more than once on the same action — the queued ops are left intact.
Takes &mut self so the borrow checker prevents two submit futures
from being alive on the same action at once, which would put two
in-flight dispatches over the same local memory.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for RdmaAction
impl !UnwindSafe for RdmaAction
impl Freeze for RdmaAction
impl Send for RdmaAction
impl Sync for RdmaAction
impl Unpin for RdmaAction
impl UnsafeUnpin for RdmaAction
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Layered].