pub trait FrameTransport: Send {
// Required methods
fn deliver<'life0, 'life1, 'async_trait>(
&'life0 mut self,
frame: &'life1 BrowserFrame,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn deliver_audio<'life0, 'life1, 'async_trait>(
&'life0 mut self,
audio: &'life1 BrowserAudio,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn deliver_terminal<'life0, 'life1, 'async_trait>(
&'life0 mut self,
id: u16,
seq: u32,
bytes: &'life1 [u8],
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
}Expand description
How one viewer receives a browser’s frames.
The connection never formats a frame itself: it hands one to this and the transport decides how the person sees it. The socket transport below is the only implementation now.
Required Methods§
Sourcefn deliver<'life0, 'life1, 'async_trait>(
&'life0 mut self,
frame: &'life1 BrowserFrame,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn deliver<'life0, 'life1, 'async_trait>(
&'life0 mut self,
frame: &'life1 BrowserFrame,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Deliver one encoded frame to this viewer. Err is a connection that
is gone, and the caller ends it.
Sourcefn deliver_audio<'life0, 'life1, 'async_trait>(
&'life0 mut self,
audio: &'life1 BrowserAudio,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn deliver_audio<'life0, 'life1, 'async_trait>(
&'life0 mut self,
audio: &'life1 BrowserAudio,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Deliver one packet of the page’s audio to this viewer.
Sourcefn deliver_terminal<'life0, 'life1, 'async_trait>(
&'life0 mut self,
id: u16,
seq: u32,
bytes: &'life1 [u8],
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn deliver_terminal<'life0, 'life1, 'async_trait>(
&'life0 mut self,
id: u16,
seq: u32,
bytes: &'life1 [u8],
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Deliver one terminal’s output to this viewer: the id, the sequence and the shell’s own bytes.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".