pub struct StreamDependency { /* private fields */ }Expand description
Represents a stream dependency in HTTP/2 priority frames.
A stream dependency consists of three components:
- A stream identifier that the stream depends on
- A weight value between 0 and 255 (representing 1-256 in the protocol)
- An exclusive flag indicating whether this is an exclusive dependency
§Stream Dependencies
In HTTP/2, stream dependencies form a dependency tree where each stream can depend on another stream. This creates a priority hierarchy that helps determine the relative order in which streams should be processed.
Implementations§
Source§impl StreamDependency
impl StreamDependency
Sourcepub fn new(
dependency_id: StreamId,
weight: u8,
is_exclusive: bool,
) -> StreamDependency
pub fn new( dependency_id: StreamId, weight: u8, is_exclusive: bool, ) -> StreamDependency
Create a new StreamDependency
Sourcepub fn load(src: &[u8]) -> Result<StreamDependency, Error>
pub fn load(src: &[u8]) -> Result<StreamDependency, Error>
Loads the stream dependency from a buffer
pub fn dependency_id(&self) -> StreamId
pub fn encode<T>(&self, dst: &mut T)where
T: BufMut,
Trait Implementations§
Source§impl Clone for StreamDependency
impl Clone for StreamDependency
Source§fn clone(&self) -> StreamDependency
fn clone(&self) -> StreamDependency
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for StreamDependency
impl Debug for StreamDependency
Source§impl Hash for StreamDependency
impl Hash for StreamDependency
Source§impl PartialEq for StreamDependency
impl PartialEq for StreamDependency
Source§fn eq(&self, other: &StreamDependency) -> bool
fn eq(&self, other: &StreamDependency) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Copy for StreamDependency
impl Eq for StreamDependency
impl StructuralPartialEq for StreamDependency
Auto Trait Implementations§
impl Freeze for StreamDependency
impl RefUnwindSafe for StreamDependency
impl Send for StreamDependency
impl Sync for StreamDependency
impl Unpin for StreamDependency
impl UnsafeUnpin for StreamDependency
impl UnwindSafe for StreamDependency
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<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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.