pub trait RdmaBackend:
Clone
+ Debug
+ Send
+ Sync
+ 'static {
type RemoteBackendContext: Clone + Debug + Serialize + DeserializeOwned + Send + Sync + 'static;
type TransportInfo;
// Required methods
fn available() -> bool;
fn transport_level(&self) -> RdmaTransportLevel;
fn transport_info(&self) -> Option<Self::TransportInfo>;
fn spawn<'life0, 'life1, 'async_trait>(
cx: &'life0 (impl 'async_trait + Actor + Send + Sync),
config: &'life1 RdmaConfig,
) -> Pin<Box<dyn Future<Output = Result<Self>> + Send + 'async_trait>>
where Self: Sized + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn register_remote_buffer<'life0, 'life1, 'async_trait>(
&'life0 self,
cx: &'life1 (impl 'async_trait + Actor + Send + Sync),
remote_buf_id: usize,
local: KeepaliveLocalMemory,
) -> Pin<Box<dyn Future<Output = Result<Self::RemoteBackendContext>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn release_buffer<'life0, 'life1, 'async_trait>(
&'life0 self,
cx: &'life1 (impl 'async_trait + Actor + Send + Sync),
remote_buf_id: usize,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn submit<'life0, 'life1, 'async_trait>(
&'life0 self,
cx: &'life1 (impl 'async_trait + Actor + Send + Sync),
ops: Vec<RdmaOp>,
timeout: Duration,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
}Expand description
A transport backend for RDMA operations.
Implementors (e.g. IbvBackend<I>, TcpBackend) are assembled
into the RdmaBackendHandle and [RdmaRemoteBackends] registries
by [register_rdma_backends!].
Required Associated Types§
Sourcetype RemoteBackendContext: Clone + Debug + Serialize + DeserializeOwned + Send + Sync + 'static
type RemoteBackendContext: Clone + Debug + Serialize + DeserializeOwned + Send + Sync + 'static
Serializable per-buffer context carried on the wire.
Sourcetype TransportInfo
type TransportInfo
Backend-specific transport details (e.g. a cffi struct with raw ibverbs handles for GPU-initiated RDMA).
Required Methods§
Sourcefn available() -> bool
fn available() -> bool
Whether this backend is available on this host in the current proc. Returns false if the backend is supported on the host but is disabled by a config.
Sourcefn transport_level(&self) -> RdmaTransportLevel
fn transport_level(&self) -> RdmaTransportLevel
The transport level this backend provides.
Sourcefn transport_info(&self) -> Option<Self::TransportInfo>
fn transport_info(&self) -> Option<Self::TransportInfo>
Low-level transport details for direct control over RDMA operations (e.g. from a GPU kernel).
Sourcefn spawn<'life0, 'life1, 'async_trait>(
cx: &'life0 (impl 'async_trait + Actor + Send + Sync),
config: &'life1 RdmaConfig,
) -> Pin<Box<dyn Future<Output = Result<Self>> + Send + 'async_trait>>where
Self: Sized + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn spawn<'life0, 'life1, 'async_trait>(
cx: &'life0 (impl 'async_trait + Actor + Send + Sync),
config: &'life1 RdmaConfig,
) -> Pin<Box<dyn Future<Output = Result<Self>> + Send + 'async_trait>>where
Self: Sized + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Spawn the backend’s actor(s) as children of cx and return its handle.
Sourcefn register_remote_buffer<'life0, 'life1, 'async_trait>(
&'life0 self,
cx: &'life1 (impl 'async_trait + Actor + Send + Sync),
remote_buf_id: usize,
local: KeepaliveLocalMemory,
) -> Pin<Box<dyn Future<Output = Result<Self::RemoteBackendContext>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn register_remote_buffer<'life0, 'life1, 'async_trait>(
&'life0 self,
cx: &'life1 (impl 'async_trait + Actor + Send + Sync),
remote_buf_id: usize,
local: KeepaliveLocalMemory,
) -> Pin<Box<dyn Future<Output = Result<Self::RemoteBackendContext>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Register local for remote access and return its wire context.
Sourcefn release_buffer<'life0, 'life1, 'async_trait>(
&'life0 self,
cx: &'life1 (impl 'async_trait + Actor + Send + Sync),
remote_buf_id: usize,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn release_buffer<'life0, 'life1, 'async_trait>(
&'life0 self,
cx: &'life1 (impl 'async_trait + Actor + Send + Sync),
remote_buf_id: usize,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Release a buffer registration by id.
Sourcefn submit<'life0, 'life1, 'async_trait>(
&'life0 self,
cx: &'life1 (impl 'async_trait + Actor + Send + Sync),
ops: Vec<RdmaOp>,
timeout: Duration,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn submit<'life0, 'life1, 'async_trait>(
&'life0 self,
cx: &'life1 (impl 'async_trait + Actor + Send + Sync),
ops: Vec<RdmaOp>,
timeout: Duration,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Submit a batch of ops to this backend.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".