pub struct RdmaRemoteBuffer {
pub id: usize,
pub size: usize,
pub owner: ActorRef<RdmaManagerActor>,
pub backends: Vec<RdmaRemoteBackendContext>,
}Expand description
Lightweight handle representing a registered RDMA buffer.
Contains an id for the buffer registration, the buffer size, a reference
to the owning RdmaManagerActor, and backend-specific contexts for
performing RDMA operations.
Fields§
§id: usize§size: usize§owner: ActorRef<RdmaManagerActor>§backends: Vec<RdmaRemoteBackendContext>Implementations§
Source§impl RdmaRemoteBuffer
impl RdmaRemoteBuffer
Sourcepub async fn choose_backend(
&self,
client: &(impl Actor + Send + Sync),
) -> Result<RdmaLocalBackend, Error>
pub async fn choose_backend( &self, client: &(impl Actor + Send + Sync), ) -> Result<RdmaLocalBackend, Error>
Choose the best available backend for this buffer.
Prefers ibverbs when both the local and remote sides support it.
Falls back to TCP when ibverbs is unavailable and
RDMA_ALLOW_TCP_FALLBACK
is enabled.
Sourcepub async fn write_from_local(
&self,
client: &(impl Actor + Send + Sync),
local: Arc<dyn RdmaLocalMemory>,
timeout: u64,
) -> Result<bool, Error>
pub async fn write_from_local( &self, client: &(impl Actor + Send + Sync), local: Arc<dyn RdmaLocalMemory>, timeout: u64, ) -> Result<bool, Error>
Push data from local memory into this remote buffer (local->remote).
Sourcepub async fn read_into_local(
&self,
client: &(impl Actor + Send + Sync),
local: Arc<dyn RdmaLocalMemory>,
timeout: u64,
) -> Result<bool, Error>
pub async fn read_into_local( &self, client: &(impl Actor + Send + Sync), local: Arc<dyn RdmaLocalMemory>, timeout: u64, ) -> Result<bool, Error>
Pull data from this remote buffer into local memory (remote->local).
Sourcepub async fn drop_buffer(&self, client: &impl Actor) -> Result<(), Error>
pub async fn drop_buffer(&self, client: &impl Actor) -> Result<(), Error>
Drop the buffer and release remote handles.
Sourcepub async fn resolve_ibv(
&self,
client: &impl Actor,
) -> Option<Result<(ActorRef<IbvManagerActor>, IbvBuffer), Error>>
pub async fn resolve_ibv( &self, client: &impl Actor, ) -> Option<Result<(ActorRef<IbvManagerActor>, IbvBuffer), Error>>
Resolve the ibverbs backend context for this buffer.
Returns None if the buffer has no ibverbs backend context (i.e.,
the remote side was created without ibverbs). Returns Some(Err(...))
if the context exists but lazy MR resolution fails. Returns
Some(Ok(...)) on success.
Sourcepub fn resolve_tcp(&self) -> Result<(ActorRef<TcpManagerActor>, usize), Error>
pub fn resolve_tcp(&self) -> Result<(ActorRef<TcpManagerActor>, usize), Error>
Extract the TCP backend context from this buffer.
Unlike [resolve_ibv], no lazy initialization is needed – the
TCP backend only needs the remote actor ref and the buffer id.
Trait Implementations§
Source§impl Clone for RdmaRemoteBuffer
impl Clone for RdmaRemoteBuffer
Source§fn clone(&self) -> RdmaRemoteBuffer
fn clone(&self) -> RdmaRemoteBuffer
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for RdmaRemoteBuffer
impl Debug for RdmaRemoteBuffer
Source§impl<'de> Deserialize<'de> for RdmaRemoteBuffer
impl<'de> Deserialize<'de> for RdmaRemoteBuffer
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl Named for RdmaRemoteBuffer
impl Named for RdmaRemoteBuffer
Source§fn typename() -> &'static str
fn typename() -> &'static str
Source§fn typehash() -> u64
fn typehash() -> u64
Source§fn typeid() -> TypeId
fn typeid() -> TypeId
Source§fn port() -> u64
fn port() -> u64
Auto Trait Implementations§
impl Freeze for RdmaRemoteBuffer
impl !RefUnwindSafe for RdmaRemoteBuffer
impl Send for RdmaRemoteBuffer
impl Sync for RdmaRemoteBuffer
impl Unpin for RdmaRemoteBuffer
impl !UnwindSafe for RdmaRemoteBuffer
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
Source§impl<T> Checkpointable for Twhere
T: RemoteMessage + Clone,
impl<T> Checkpointable for Twhere
T: RemoteMessage + Clone,
Source§type State = T
type State = T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§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>
Source§impl<A, M> Handler<IndexedErasedUnbound<M>> for A
impl<A, M> Handler<IndexedErasedUnbound<M>> for A
§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].