Struct s2n_quic_core::frame::stream::Stream
source · pub struct Stream<Data> {
pub stream_id: VarInt,
pub offset: VarInt,
pub is_last_frame: bool,
pub is_fin: bool,
pub data: Data,
}
Fields§
§stream_id: VarInt
A variable-length integer indicating the stream ID of the stream
offset: VarInt
A variable-length integer specifying the byte offset in the stream for the data in this STREAM frame.
is_last_frame: bool
If true, the frame is the last frame in the payload
is_fin: bool
If true, the frame marks the end of the stream.
data: Data
The bytes from the designated stream to be delivered.
Implementations§
Trait Implementations§
source§impl<Data> AckElicitable for Stream<Data>
impl<Data> AckElicitable for Stream<Data>
fn ack_elicitation(&self) -> AckElicitation
source§impl<Data> CongestionControlled for Stream<Data>
impl<Data> CongestionControlled for Stream<Data>
fn is_congestion_controlled(&self) -> bool
source§impl<'a, Data: DecoderValue<'a>> DecoderParameterizedValue<'a> for Stream<Data>
impl<'a, Data: DecoderValue<'a>> DecoderParameterizedValue<'a> for Stream<Data>
type Parameter = u8
fn decode_parameterized( tag: Self::Parameter, buffer: DecoderBuffer<'a> ) -> DecoderBufferResult<'a, Self>
source§impl<'a, Data: DecoderValueMut<'a>> DecoderParameterizedValueMut<'a> for Stream<Data>
impl<'a, Data: DecoderValueMut<'a>> DecoderParameterizedValueMut<'a> for Stream<Data>
type Parameter = u8
fn decode_parameterized_mut( tag: Self::Parameter, buffer: DecoderBufferMut<'a> ) -> DecoderBufferMutResult<'a, Self>
source§impl<Data: EncoderValue> EncoderValue for Stream<Data>
impl<Data: EncoderValue> EncoderValue for Stream<Data>
source§fn encoding_size_for_encoder<E: Encoder>(&self, encoder: &E) -> usize
fn encoding_size_for_encoder<E: Encoder>(&self, encoder: &E) -> usize
We hand optimize this encoding size so we can quickly estimate how large a STREAM frame will be
source§fn encode_mut<E>(&mut self, encoder: &mut E)where
E: Encoder,
fn encode_mut<E>(&mut self, encoder: &mut E)where
E: Encoder,
Encodes the value into the encoder, while potentially mutating the value itself
source§fn encoding_size(&self) -> usize
fn encoding_size(&self) -> usize
Returns the encoding size with no buffer constrains
source§fn encode_with_len_prefix<Len, E>(&self, encoder: &mut E)
fn encode_with_len_prefix<Len, E>(&self, encoder: &mut E)
Encodes the value into the encoder with a prefix of
Len
fn encode_to_vec(&self) -> Vec<u8>
source§impl<'a> From<Stream<DecoderBuffer<'a>>> for StreamRef<'a>
impl<'a> From<Stream<DecoderBuffer<'a>>> for StreamRef<'a>
source§fn from(s: Stream<DecoderBuffer<'a>>) -> Self
fn from(s: Stream<DecoderBuffer<'a>>) -> Self
Converts to this type from the input type.
source§impl<'a> From<Stream<DecoderBufferMut<'a>>> for StreamRef<'a>
impl<'a> From<Stream<DecoderBufferMut<'a>>> for StreamRef<'a>
source§fn from(s: Stream<DecoderBufferMut<'a>>) -> Self
fn from(s: Stream<DecoderBufferMut<'a>>) -> Self
Converts to this type from the input type.
source§impl<'a> From<Stream<DecoderBufferMut<'a>>> for StreamMut<'a>
impl<'a> From<Stream<DecoderBufferMut<'a>>> for StreamMut<'a>
source§fn from(s: Stream<DecoderBufferMut<'a>>) -> Self
fn from(s: Stream<DecoderBufferMut<'a>>) -> Self
Converts to this type from the input type.
source§impl<Data> IntoEvent<Frame> for &Stream<Data>where
Data: EncoderValue,
impl<Data> IntoEvent<Frame> for &Stream<Data>where
Data: EncoderValue,
fn into_event(self) -> Frame
source§impl<Data: PartialEq> PartialEq for Stream<Data>
impl<Data: PartialEq> PartialEq for Stream<Data>
impl<Data: Eq> Eq for Stream<Data>
impl<Data> StructuralPartialEq for Stream<Data>
Auto Trait Implementations§
impl<Data> Freeze for Stream<Data>where
Data: Freeze,
impl<Data> RefUnwindSafe for Stream<Data>where
Data: RefUnwindSafe,
impl<Data> Send for Stream<Data>where
Data: Send,
impl<Data> Sync for Stream<Data>where
Data: Sync,
impl<Data> Unpin for Stream<Data>where
Data: Unpin,
impl<Data> UnwindSafe for Stream<Data>where
Data: UnwindSafe,
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> PacketPayloadEncoder for Twhere
T: EncoderValue,
impl<T> PacketPayloadEncoder for Twhere
T: EncoderValue,
source§fn encoding_size_hint<E>(&mut self, encoder: &E, minimum_len: usize) -> usizewhere
E: Encoder,
fn encoding_size_hint<E>(&mut self, encoder: &E, minimum_len: usize) -> usizewhere
E: Encoder,
Returns an estimate of the encoding size of the payload. This
may be inaccurate from what actually is encoded. Estimates should
be less than or equal to what is actually written.
Implementations can return 0 to skip encoding.