[−][src]Struct solicit::http::frame::headers::HeadersFrame
A struct representing the HEADERS frames of HTTP/2, as defined in the HTTP/2 spec, section 6.2.
Fields
stream_id: StreamId
The ID of the stream with which this frame is associated
stream_dep: Option<StreamDependency>
The stream dependency information, if any.
padding_len: Option<u8>
The length of the padding, if any.
Implementations
impl<'a> HeadersFrame<'a>
[src]
pub fn new(fragment: Vec<u8>, stream_id: StreamId) -> HeadersFrame<'a>
[src]
Creates a new HeadersFrame
with the given header fragment and stream
ID. No padding, no stream dependency, and no flags are set.
pub fn with_dependency(
fragment: Vec<u8>,
stream_id: StreamId,
stream_dep: StreamDependency
) -> HeadersFrame<'a>
[src]
fragment: Vec<u8>,
stream_id: StreamId,
stream_dep: StreamDependency
) -> HeadersFrame<'a>
Creates a new HeadersFrame
with the given header fragment, stream ID
and stream dependency information. No padding and no flags are set.
pub fn is_headers_end(&self) -> bool
[src]
Returns whether this frame ends the headers. If not, there MUST be a number of follow up CONTINUATION frames that send the rest of the header data.
pub fn is_end_of_stream(&self) -> bool
[src]
Returns whther this frame ends the stream it is associated with.
pub fn set_padding(&mut self, padding_len: u8)
[src]
Sets the padding length for the frame, as well as the corresponding Padded flag.
pub fn header_fragment(&self) -> &[u8]
[src]
pub fn set_flag(&mut self, flag: HeadersFlag)
[src]
Sets the given flag for the frame.
Trait Implementations
impl<'a> Clone for HeadersFrame<'a>
[src]
fn clone(&self) -> HeadersFrame<'a>
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<'a> Debug for HeadersFrame<'a>
[src]
impl<'a> Frame<'a> for HeadersFrame<'a>
[src]
type FlagType = HeadersFlag
The type that represents the flags that the particular Frame
can take.
This makes sure that only valid Flag
s are used with each Frame
.
fn from_raw(raw_frame: &'a RawFrame) -> Option<HeadersFrame<'a>>
[src]
Creates a new HeadersFrame
with the given RawFrame
(i.e. header and
payload), if possible.
Returns
None
if a valid HeadersFrame
cannot be constructed from the given
RawFrame
. The stream ID must not be 0.
Otherwise, returns a newly constructed HeadersFrame
.
fn is_set(&self, flag: HeadersFlag) -> bool
[src]
Tests if the given flag is set for the frame.
fn get_stream_id(&self) -> StreamId
[src]
Returns the StreamId
of the stream to which the frame is associated.
A SettingsFrame
always has to be associated to stream 0
.
fn get_header(&self) -> FrameHeader
[src]
Returns a FrameHeader
based on the current state of the Frame
.
impl<'a> FrameIR for HeadersFrame<'a>
[src]
fn serialize_into<B: FrameBuilder>(self, b: &mut B) -> Result<()>
[src]
impl<'a> PartialEq<HeadersFrame<'a>> for HeadersFrame<'a>
[src]
fn eq(&self, other: &HeadersFrame<'a>) -> bool
[src]
fn ne(&self, other: &HeadersFrame<'a>) -> bool
[src]
impl<'a> StructuralPartialEq for HeadersFrame<'a>
[src]
Auto Trait Implementations
impl<'a> RefUnwindSafe for HeadersFrame<'a>
impl<'a> Send for HeadersFrame<'a>
impl<'a> Sync for HeadersFrame<'a>
impl<'a> Unpin for HeadersFrame<'a>
impl<'a> UnwindSafe for HeadersFrame<'a>
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,
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> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
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.
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>,