pub trait RegisterPort<'a, D: Deploy<'a> + ?Sized>: Clone {
// Required methods
fn register(&self, key: usize, port: D::Port);
fn raw_port(&self, key: usize) -> D::ExternalRawPort;
fn as_bytes_sink(
&self,
key: usize,
) -> impl Future<Output = Pin<Box<dyn Sink<Bytes, Error = Error>>>> + 'a;
fn as_bincode_sink<T: Serialize + 'static>(
&self,
key: usize,
) -> impl Future<Output = Pin<Box<dyn Sink<T, Error = Error>>>> + 'a;
fn as_bytes_source(
&self,
key: usize,
) -> impl Future<Output = Pin<Box<dyn Stream<Item = Bytes>>>> + 'a;
fn as_bincode_source<T: DeserializeOwned + 'static>(
&self,
key: usize,
) -> impl Future<Output = Pin<Box<dyn Stream<Item = T>>>> + 'a;
}
Available on crate feature
build
only.Required Methods§
fn register(&self, key: usize, port: D::Port)
fn raw_port(&self, key: usize) -> D::ExternalRawPort
fn as_bytes_sink( &self, key: usize, ) -> impl Future<Output = Pin<Box<dyn Sink<Bytes, Error = Error>>>> + 'a
fn as_bincode_sink<T: Serialize + 'static>( &self, key: usize, ) -> impl Future<Output = Pin<Box<dyn Sink<T, Error = Error>>>> + 'a
fn as_bytes_source( &self, key: usize, ) -> impl Future<Output = Pin<Box<dyn Stream<Item = Bytes>>>> + 'a
fn as_bincode_source<T: DeserializeOwned + 'static>( &self, key: usize, ) -> impl Future<Output = Pin<Box<dyn Stream<Item = T>>>> + 'a
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.
Implementors§
impl<'a> RegisterPort<'a, HydroDeploy> for DeployExternal
Available on crate feature
deploy
only.