Struct soketto::base::Header [−][src]
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
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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
[src]
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
[src]
V: MultiLane<T>,