pub(crate) struct WebSocketSink {
pub(crate) socket: WebSocket,
}Expand description
WebSocket implementation of ExportSink.
Control frames go out as JSON text messages and CSV chunks as binary messages.
Fields§
§socket: WebSocketUpgraded client connection.
Implementations§
Trait Implementations§
Source§impl ExportSink for WebSocketSink
impl ExportSink for WebSocketSink
Source§fn send_meta<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
file_name: &'life1 str,
content_type: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn send_meta<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
file_name: &'life1 str,
content_type: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Sends metadata as a text JSON WebSocket message (MetaFrame).
Source§fn send_chunk<'life0, 'async_trait>(
&'life0 mut self,
data: Vec<u8>,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn send_chunk<'life0, 'async_trait>(
&'life0 mut self,
data: Vec<u8>,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Sends a CSV chunk as a binary WebSocket message.
Source§fn send_summary<'life0, 'life1, 'async_trait>(
&'life0 mut self,
bytes_sent: usize,
missing_channels: &'life1 [u8],
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn send_summary<'life0, 'life1, 'async_trait>(
&'life0 mut self,
bytes_sent: usize,
missing_channels: &'life1 [u8],
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Sends byte count and missing channels as a text JSON message (SummaryFrame).
Auto Trait Implementations§
impl !Freeze for WebSocketSink
impl !RefUnwindSafe for WebSocketSink
impl !Sync for WebSocketSink
impl !UnwindSafe for WebSocketSink
impl Send for WebSocketSink
impl Unpin for WebSocketSink
impl UnsafeUnpin for WebSocketSink
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more