pub struct Dispatcher { /* private fields */ }Expand description
Registry and dispatcher for Text (Ext lane) and Binary (Hot lane) services.
Implementations§
Source§impl Dispatcher
impl Dispatcher
pub fn new() -> Dispatcher
pub fn register_text(&self, svc: Arc<dyn TextService>)
pub fn register_hot(&self, svc: Arc<dyn BinaryService>)
pub fn registered_text_svcs(&self) -> Vec<&'static str>
pub fn registered_hot_svcs(&self) -> Vec<u8> ⓘ
pub async fn dispatch_text( &self, ctx: RealtimeCtx, env: Envelope, ) -> Result<(), WsPrismError>
pub async fn dispatch_hot( &self, ctx: RealtimeCtx, frame: HotFrame, ) -> Result<(), WsPrismError>
Trait Implementations§
Source§impl Default for Dispatcher
impl Default for Dispatcher
Source§fn default() -> Dispatcher
fn default() -> Dispatcher
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for Dispatcher
impl !RefUnwindSafe for Dispatcher
impl Send for Dispatcher
impl Sync for Dispatcher
impl Unpin for Dispatcher
impl !UnwindSafe for Dispatcher
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