pub struct PushPromise {
stream_id: StreamId,
promised_id: StreamId,
header_block: HeaderBlock,
flags: PushPromiseFlag,
}Fields§
§stream_id: StreamIdThe ID of the stream with which this frame is associated.
promised_id: StreamIdThe ID of the stream being reserved by this PushPromise.
header_block: HeaderBlockThe header block fragment
flags: PushPromiseFlagThe associated flags
Implementations§
Source§impl PushPromise
impl PushPromise
pub fn new( stream_id: StreamId, promised_id: StreamId, pseudo: Pseudo, fields: HeaderMap, ) -> Self
pub fn validate_request(req: &Request<()>) -> Result<(), PushPromiseHeaderError>
fn safe_and_cacheable(method: &Method) -> bool
pub fn fields(&self) -> &HeaderMap
Sourcepub fn load(head: Head, src: BytesMut) -> Result<(Self, BytesMut), Error>
pub fn load(head: Head, src: BytesMut) -> Result<(Self, BytesMut), Error>
Loads the push promise frame but doesn’t actually do HPACK decoding.
HPACK decoding is done in the load_hpack step.
pub fn load_hpack( &mut self, src: &mut BytesMut, max_header_list_size: usize, decoder: &mut Decoder, ) -> Result<(), Error>
pub fn stream_id(&self) -> StreamId
pub fn promised_id(&self) -> StreamId
pub fn is_end_headers(&self) -> bool
pub fn set_end_headers(&mut self)
pub fn is_over_size(&self) -> bool
pub fn encode( self, encoder: &mut Encoder, dst: &mut Limit<&'_ mut BytesMut>, ) -> Option<Continuation>
fn head(&self) -> Head
Sourcepub fn into_parts(self) -> (Pseudo, HeaderMap)
pub fn into_parts(self) -> (Pseudo, HeaderMap)
Consume self, returning the parts of the frame
Trait Implementations§
Source§impl Debug for PushPromise
impl Debug for PushPromise
Source§impl<T> From<PushPromise> for Frame<T>
impl<T> From<PushPromise> for Frame<T>
Source§fn from(src: PushPromise) -> Self
fn from(src: PushPromise) -> Self
Converts to this type from the input type.
Source§impl PartialEq for PushPromise
impl PartialEq for PushPromise
impl Eq for PushPromise
impl StructuralPartialEq for PushPromise
Auto Trait Implementations§
impl !Freeze for PushPromise
impl RefUnwindSafe for PushPromise
impl Send for PushPromise
impl Sync for PushPromise
impl Unpin for PushPromise
impl UnwindSafe for PushPromise
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.