Struct ntex::ws::Parser [−][src]
pub struct Parser;
Expand description
WebSocket frame parser.
Implementations
impl Parser
[src]
impl Parser
[src]pub fn parse(
src: &mut BytesMut,
server: bool,
max_size: usize
) -> Result<Option<(bool, OpCode, Option<BytesMut>)>, ProtocolError>
[src]
pub fn parse(
src: &mut BytesMut,
server: bool,
max_size: usize
) -> Result<Option<(bool, OpCode, Option<BytesMut>)>, ProtocolError>
[src]Parse the input stream into a frame.
pub fn parse_close_payload(payload: &[u8]) -> Option<CloseReason>
[src]
pub fn parse_close_payload(payload: &[u8]) -> Option<CloseReason>
[src]Parse the payload of a close frame.
pub fn write_message<B: AsRef<[u8]>>(
dst: &mut BytesMut,
pl: B,
op: OpCode,
fin: bool,
mask: bool
)
[src]
pub fn write_message<B: AsRef<[u8]>>(
dst: &mut BytesMut,
pl: B,
op: OpCode,
fin: bool,
mask: bool
)
[src]Generate binary representation
pub fn write_close(dst: &mut BytesMut, reason: Option<CloseReason>, mask: bool)
[src]
pub fn write_close(dst: &mut BytesMut, reason: Option<CloseReason>, mask: bool)
[src]Create a new Close control frame.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Parser
impl Send for Parser
impl Sync for Parser
impl Unpin for Parser
impl UnwindSafe for Parser
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> Instrument for T
[src]
impl<T> Instrument for T
[src]fn instrument(self, span: Span) -> Instrumented<Self>
[src]
fn instrument(self, span: Span) -> Instrumented<Self>
[src]Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
fn in_current_span(self) -> Instrumented<Self>
[src]
fn in_current_span(self) -> Instrumented<Self>
[src]impl<T> Same<T> for T
impl<T> Same<T> for T
type Output = T
type Output = T
Should always be Self