Struct soketto::base::Header[][src]

pub struct Header { /* fields omitted */ }

A websocket base frame header, i.e. everything but the payload.

Implementations

impl Header[src]

pub fn new(oc: OpCode) -> Self[src]

Create a new frame header with a given OpCode.

pub fn is_fin(&self) -> bool[src]

Is the fin flag set?

pub fn set_fin(&mut self, fin: bool) -> &mut Self[src]

Set the fin flag.

pub fn is_rsv1(&self) -> bool[src]

Is the rsv1 flag set?

pub fn set_rsv1(&mut self, rsv1: bool) -> &mut Self[src]

Set the rsv1 flag.

pub fn is_rsv2(&self) -> bool[src]

Is the rsv2 flag set?

pub fn set_rsv2(&mut self, rsv2: bool) -> &mut Self[src]

Set the rsv2 flag.

pub fn is_rsv3(&self) -> bool[src]

Is the rsv3 flag set?

pub fn set_rsv3(&mut self, rsv3: bool) -> &mut Self[src]

Set the rsv3 flag.

pub fn is_masked(&self) -> bool[src]

Is the masked flag set?

pub fn set_masked(&mut self, masked: bool) -> &mut Self[src]

Set the masked flag.

pub fn opcode(&self) -> OpCode[src]

Get the opcode.

pub fn set_opcode(&mut self, opcode: OpCode) -> &mut Self[src]

Set the opcode

pub fn mask(&self) -> u32[src]

Get the mask.

pub fn set_mask(&mut self, mask: u32) -> &mut Self[src]

Set the mask

pub fn payload_len(&self) -> usize[src]

Get the payload length.

pub fn set_payload_len(&mut self, len: usize) -> &mut Self[src]

Set the payload length.

Trait Implementations

impl Clone for Header[src]

impl Debug for Header[src]

impl Display for Header[src]

Auto Trait Implementations

impl RefUnwindSafe for Header

impl Send for Header

impl Sync for Header

impl Unpin for Header

impl UnwindSafe for Header

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T[src]

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 
[src]