pub struct WebSocket { /* private fields */ }Implementations§
Source§impl WebSocket
impl WebSocket
pub fn sync_build() -> WebSocketBuilder<ScReq>
pub fn open(url: impl AsRef<str>) -> Result<WebSocket, HlsError>
pub fn open_raw( url: impl AsRef<str>, context: impl AsRef<[u8]>, ) -> Result<WebSocket, HlsError>
pub fn write_frame(&mut self, frame: WsFrame) -> Result<(), HlsError>
pub fn read_frame(&mut self) -> Result<WsFrame, HlsError>
pub fn shutdown(self) -> Result<(), HlsError>
Auto Trait Implementations§
impl Freeze for WebSocket
impl RefUnwindSafe for WebSocket
impl Send for WebSocket
impl Sync for WebSocket
impl Unpin for WebSocket
impl UnwindSafe for WebSocket
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