pub struct WebSocketSink { /* private fields */ }Expand description
WebSocket notification sink
Receives payloads from the deliver operator and dispatches them
to connected WebSocket clients via the WebSocketDispatcher.
Implementations§
Source§impl WebSocketSink
impl WebSocketSink
Sourcepub fn new(dispatcher: Arc<dyn WebSocketDispatcher>) -> Self
pub fn new(dispatcher: Arc<dyn WebSocketDispatcher>) -> Self
Create a new WebSocketSink with a dispatcher
Trait Implementations§
Source§impl Debug for WebSocketSink
impl Debug for WebSocketSink
Source§impl Sink for WebSocketSink
impl Sink for WebSocketSink
Source§fn deliver<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
payload: Value,
recipient_id: Option<&'life1 str>,
context_vars: &'life2 HashMap<String, Value>,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn deliver<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
payload: Value,
recipient_id: Option<&'life1 str>,
context_vars: &'life2 HashMap<String, Value>,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Deliver a payload to this sink Read more
Auto Trait Implementations§
impl Freeze for WebSocketSink
impl !RefUnwindSafe for WebSocketSink
impl Send for WebSocketSink
impl Sync for WebSocketSink
impl Unpin for WebSocketSink
impl UnsafeUnpin for WebSocketSink
impl !UnwindSafe 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