pub trait PeerSelectorRuntime: Send + Sync {
type Error: Error + Send + Sync + 'static;
// Required methods
fn atomic_opset(&self) -> AtomicOpsetDecl;
fn dispatch_atomic(
&mut self,
op_type: &str,
inputs: &[(&str, &(dyn SlotValue + 'static))],
ctx: &mut RuntimeResourceRef<'_>,
) -> Result<DispatchResult, Self::Error>;
}Expand description
Role trait for peer-sampling implementations.
Required Associated Types§
Required Methods§
Sourcefn atomic_opset(&self) -> AtomicOpsetDecl
fn atomic_opset(&self) -> AtomicOpsetDecl
Atomic-op opset this impl owns.
Sourcefn dispatch_atomic(
&mut self,
op_type: &str,
inputs: &[(&str, &(dyn SlotValue + 'static))],
ctx: &mut RuntimeResourceRef<'_>,
) -> Result<DispatchResult, Self::Error>
fn dispatch_atomic( &mut self, op_type: &str, inputs: &[(&str, &(dyn SlotValue + 'static))], ctx: &mut RuntimeResourceRef<'_>, ) -> Result<DispatchResult, Self::Error>
Rust-dispatch entry point for atomic ops.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".