Trait hydro_lang::deploy::RegisterPort
source · 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;
}
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
Object Safety§
This trait is not object safe.