pub struct WebSocketFrameBuilder { /* private fields */ }Expand description
Builder for WebSocketFrame.
Implementations§
Source§impl WebSocketFrameBuilder
impl WebSocketFrameBuilder
Sourcepub fn opcode<VALUE: Into<JsFloat>>(&mut self, value: VALUE) -> &mut Self
pub fn opcode<VALUE: Into<JsFloat>>(&mut self, value: VALUE) -> &mut Self
WebSocket message opcode.
Sourcepub fn payload_data<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
pub fn payload_data<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
WebSocket message payload data. If the opcode is 1, this is a text message and payloadData is a UTF-8 string. If the opcode isn’t 1, then payloadData is a base64 encoded string representing binary data.
Sourcepub fn build(&self) -> Result<WebSocketFrame, WebSocketFrameBuilderError>
pub fn build(&self) -> Result<WebSocketFrame, WebSocketFrameBuilderError>
Trait Implementations§
Source§impl Clone for WebSocketFrameBuilder
impl Clone for WebSocketFrameBuilder
Source§fn clone(&self) -> WebSocketFrameBuilder
fn clone(&self) -> WebSocketFrameBuilder
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for WebSocketFrameBuilder
impl RefUnwindSafe for WebSocketFrameBuilder
impl Send for WebSocketFrameBuilder
impl Sync for WebSocketFrameBuilder
impl Unpin for WebSocketFrameBuilder
impl UnsafeUnpin for WebSocketFrameBuilder
impl UnwindSafe for WebSocketFrameBuilder
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