Skip to main content

H2Frame

Struct H2Frame 

Source
pub struct H2Frame<'a> { /* private fields */ }

Implementations§

Source§

impl<'a> H2Frame<'a>

Source

pub fn none_frame() -> H2Frame<'a>

Source

pub fn from_bytes(buffer: &'a Buffer) -> Result<H2Frame<'a>, HlsError>

Source

pub fn write_to<W: WriteExt>(self, writer: &mut W)

Source

pub fn to_bytes(self) -> Vec<u8>

Source

pub fn window_update() -> H2Frame<'a>

Source

pub fn default_setting() -> H2Frame<'a>

Source

pub fn new_header(body_len: usize, sid: u32) -> H2Frame<'a>

Source

pub fn new_body(body: &'a [u8], sid: u32) -> Vec<H2Frame<'a>>

Source

pub fn flag(&self) -> &FrameFlag

Source

pub fn frame_type(&self) -> &FrameType

Source

pub fn payload(&self) -> &[u8]

Source

pub fn set_payload(&mut self, payload: &'a [u8])

Source

pub fn is_empty(&self) -> bool

Source

pub fn len(&self) -> usize

Source

pub fn frame_id(&self) -> u32

Source

pub fn set_frame_type(&mut self, frame_type: FrameType)

Source

pub fn set_flag(&mut self, flag: FrameFlag)

Source

pub fn set_settings(&mut self, settings: Vec<Setting>)

Source

pub fn set_weight(&mut self, weight: u8)

Source

pub fn add_flag(&mut self, flag: FrameFlag)

Source

pub fn set_priority(&mut self, weight: u8)

Source

pub fn set_stream_identifier(&mut self, stream_identifier: u32)

Source

pub fn stream_identifier(&self) -> u32

Source

pub fn is_end_frame(&self) -> bool

Trait Implementations§

Source§

impl<'a> Debug for H2Frame<'a>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'a> Freeze for H2Frame<'a>

§

impl<'a> RefUnwindSafe for H2Frame<'a>

§

impl<'a> Send for H2Frame<'a>

§

impl<'a> Sync for H2Frame<'a>

§

impl<'a> Unpin for H2Frame<'a>

§

impl<'a> UnsafeUnpin for H2Frame<'a>

§

impl<'a> UnwindSafe for H2Frame<'a>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.