pub struct WsEndpoint<T, F> { /* private fields */ }Implementations§
Source§impl<F: 'static + Future<Output = Option<String>> + Send> WsEndpoint<String, F>
impl<F: 'static + Future<Output = Option<String>> + Send> WsEndpoint<String, F>
pub fn new_async_text_endpoint( processor: fn(String) -> F, ) -> WsEndpoint<String, F>
pub fn new_sync_text_endpoint( processor: fn(String) -> F, ) -> WsEndpoint<String, F>
pub async fn start<A: ToSocketAddrs>(self, addr: A) -> Result<()>
Source§impl<F: 'static + Future<Output = Option<Vec<u8>>> + Send> WsEndpoint<Vec<u8>, F>
impl<F: 'static + Future<Output = Option<Vec<u8>>> + Send> WsEndpoint<Vec<u8>, F>
pub fn new_async_binary_endpoint( processor: fn(Vec<u8>) -> F, ) -> WsEndpoint<Vec<u8>, F>
pub fn new_sync_binary_endpoint( processor: fn(Vec<u8>) -> F, ) -> WsEndpoint<Vec<u8>, F>
pub async fn start<A: ToSocketAddrs>(self, addr: A) -> Result<()>
Auto Trait Implementations§
impl<T, F> Freeze for WsEndpoint<T, F>
impl<T, F> RefUnwindSafe for WsEndpoint<T, F>
impl<T, F> Send for WsEndpoint<T, F>
impl<T, F> Sync for WsEndpoint<T, F>
impl<T, F> Unpin for WsEndpoint<T, F>
impl<T, F> UnwindSafe for WsEndpoint<T, F>
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