pub struct Frame { /* private fields */ }
Expand description
A struct representing a WebSocket
frame.
Implementations
sourceimpl Frame
impl Frame
sourcepub fn close(reason: Option<CloseReason>, genmask: bool) -> FramedMessage
pub fn close(reason: Option<CloseReason>, genmask: bool) -> FramedMessage
Create a new Close control frame.
sourcepub fn parse<S>(
pl: &mut PayloadBuffer<S>,
server: bool,
max_size: usize
) -> Poll<Option<Frame>, ProtocolError>where
S: Stream<Item = Bytes, Error = PayloadError>,
pub fn parse<S>(
pl: &mut PayloadBuffer<S>,
server: bool,
max_size: usize
) -> Poll<Option<Frame>, ProtocolError>where
S: Stream<Item = Bytes, Error = PayloadError>,
Parse the input stream into a frame.
sourcepub fn parse_close_payload(payload: &Binary) -> Option<CloseReason>
pub fn parse_close_payload(payload: &Binary) -> Option<CloseReason>
Parse the payload of a close frame.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Frame
impl Send for Frame
impl Sync for Frame
impl Unpin for Frame
impl UnwindSafe for Frame
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more