pub trait UiHandler {
// Required methods
fn read_data<'life0, 'async_trait>(
&'life0 mut self,
len: usize,
) -> Pin<Box<dyn Future<Output = Result<Bytes>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn read_line<'life0, 'async_trait>(
&'life0 mut self,
len: usize,
) -> Pin<Box<dyn Future<Output = Result<Bytes>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn write_output<'life0, 'async_trait>(
&'life0 mut self,
data: Bytes,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn write_error<'life0, 'async_trait>(
&'life0 mut self,
data: Bytes,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}
Expand description
Callback to process data and requests received from the server.
Required Methods§
Sourcefn read_data<'life0, 'async_trait>(
&'life0 mut self,
len: usize,
) -> Pin<Box<dyn Future<Output = Result<Bytes>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn read_data<'life0, 'async_trait>(
&'life0 mut self,
len: usize,
) -> Pin<Box<dyn Future<Output = Result<Bytes>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Handles bulk input request.
Sourcefn read_line<'life0, 'async_trait>(
&'life0 mut self,
len: usize,
) -> Pin<Box<dyn Future<Output = Result<Bytes>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn read_line<'life0, 'async_trait>(
&'life0 mut self,
len: usize,
) -> Pin<Box<dyn Future<Output = Result<Bytes>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Handles line input request.