pub struct StringSend<S: Write> { /* private fields */ }
Expand description
send part of text message
Implementations§
Source§impl<S: Write> StringSend<S>
impl<S: Write> StringSend<S>
Sourcepub fn new(stream: S, state: FrameWriteState) -> Self
pub fn new(stream: S, state: FrameWriteState) -> Self
construct method
Sourcepub fn ping<'a>(&mut self, msg: &'a str) -> Result<(), WsError>
pub fn ping<'a>(&mut self, msg: &'a str) -> Result<(), WsError>
helper method to send ping message
Sourcepub fn pong<'a>(&mut self, msg: &'a str) -> Result<(), WsError>
pub fn pong<'a>(&mut self, msg: &'a str) -> Result<(), WsError>
helper method to send pong message
Sourcepub fn close<'a>(&mut self, code: u16, msg: &'a str) -> Result<(), WsError>
pub fn close<'a>(&mut self, code: u16, msg: &'a str) -> Result<(), WsError>
helper method to send close message
Auto Trait Implementations§
impl<S> Freeze for StringSend<S>where
S: Freeze,
impl<S> RefUnwindSafe for StringSend<S>where
S: RefUnwindSafe,
impl<S> Send for StringSend<S>where
S: Send,
impl<S> Sync for StringSend<S>where
S: Sync,
impl<S> Unpin for StringSend<S>where
S: Unpin,
impl<S> UnwindSafe for StringSend<S>where
S: UnwindSafe,
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