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, performs eager validation (size check + local
memory range race detection), and then runs them concurrently across
the available backends on Self::submit.
Local-memory race detection treats an add_read_into_local claim as a
write to the local range and an add_write_from_local claim as a
read; two reads of the same range merge into one claim, anything else
errors. Remote-side ranges are deliberately not tracked.
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. Records a local write
claim over the local memory range.
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. Records a local read
claim over the local memory range.
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 and overlap claims are left intact.
Takes &mut self so the borrow checker prevents two submit
futures from being alive on the same action simultaneously;
otherwise the local-range overlap detection would be meaningless
(two in-flight dispatches over the same claimed local memory).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for RdmaAction
impl !RefUnwindSafe for RdmaAction
impl Send for RdmaAction
impl Sync for RdmaAction
impl Unpin for RdmaAction
impl UnsafeUnpin for RdmaAction
impl !UnwindSafe 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<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].