Struct ws_tool::codec::StringSend
source · 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> 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