Trait s2n_quic_core::transmission::writer::Writer

source ·
pub trait Writer {
Show 13 methods // Required methods fn current_time(&self) -> Timestamp; fn transmission_constraint(&self) -> Constraint; fn transmission_mode(&self) -> Mode; fn remaining_capacity(&self) -> usize; fn write_frame<Frame>(&mut self, frame: &Frame) -> Option<PacketNumber> where Frame: EncoderValue + FrameTrait, for<'frame> &'frame Frame: IntoEvent<Frame>; fn write_fitted_frame<Frame>(&mut self, frame: &Frame) -> PacketNumber where Frame: EncoderValue + FrameTrait, for<'frame> &'frame Frame: IntoEvent<Frame>; fn write_frame_forced<Frame>( &mut self, frame: &Frame ) -> Option<PacketNumber> where Frame: EncoderValue + FrameTrait, for<'frame> &'frame Frame: IntoEvent<Frame>; fn ack_elicitation(&self) -> AckElicitation; fn packet_number(&self) -> PacketNumber; fn local_endpoint_type(&self) -> Type; fn header_len(&self) -> usize; fn tag_len(&self) -> usize; // Provided method fn write_ack_frame<AckRanges: AckRangesTrait>( &mut self, ack_frame: &Ack<AckRanges> ) -> Option<PacketNumber> { ... }
}
Expand description

Context information that is passed to on_transmit calls on Streams

Required Methods§

source

fn current_time(&self) -> Timestamp

Returns the current point of time

source

fn transmission_constraint(&self) -> Constraint

Returns the transmission constraint for the current packet

source

fn transmission_mode(&self) -> Mode

Returns the transmission mode for the current packet

source

fn remaining_capacity(&self) -> usize

Returns the number of available bytes remaining in the current payload

source

fn write_frame<Frame>(&mut self, frame: &Frame) -> Option<PacketNumber>
where Frame: EncoderValue + FrameTrait, for<'frame> &'frame Frame: IntoEvent<Frame>,

Attempt to write a frame.

If this was successful the number of the packet that will be used to send the frame will be returned.

source

fn write_fitted_frame<Frame>(&mut self, frame: &Frame) -> PacketNumber
where Frame: EncoderValue + FrameTrait, for<'frame> &'frame Frame: IntoEvent<Frame>,

Writes a pre-fitted frame.

Callers should ensure the frame fits within the outgoing buffer when using this function. The context should panic if otherwise.

source

fn write_frame_forced<Frame>(&mut self, frame: &Frame) -> Option<PacketNumber>
where Frame: EncoderValue + FrameTrait, for<'frame> &'frame Frame: IntoEvent<Frame>,

Attempt to write a frame, bypassing congestion controller constraint checks. If this was successful the number of the packet that will be used to send the frame will be returned.

source

fn ack_elicitation(&self) -> AckElicitation

Returns the ack elicitation of the current packet

source

fn packet_number(&self) -> PacketNumber

Returns the packet number for the current packet

source

fn local_endpoint_type(&self) -> Type

Returns the local endpoint type (client or server)

source

fn header_len(&self) -> usize

Returns the length of the packet header in bytes

source

fn tag_len(&self) -> usize

Returns the length of the authentication tag in bytes

Provided Methods§

source

fn write_ack_frame<AckRanges: AckRangesTrait>( &mut self, ack_frame: &Ack<AckRanges> ) -> Option<PacketNumber>

Attempt to write an ack frame.

If this was successful the number of the packet that will be used to send the frame will be returned.

Object Safety§

This trait is not object safe.

Implementors§