pub struct Socket {
pub sink: Sink,
pub stream: Stream,
/* private fields */
}Fields§
§sink: Sink§stream: StreamImplementations§
Source§impl Socket
impl Socket
pub fn new<M, E, S>( socket: S, config: SocketConfig, handle: impl Handle, ) -> Self
pub async fn send( &self, message: InMessage, ) -> Result<(), SendError<InRawMessage>>
pub async fn send_raw( &self, message: InRawMessage, ) -> Result<(), SendError<InRawMessage>>
pub async fn recv(&mut self) -> Option<Result<Message, WSError>>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Socket
impl RefUnwindSafe for Socket
impl Send for Socket
impl Sync for Socket
impl Unpin for Socket
impl UnwindSafe for Socket
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