pub struct QuicSendProtocol<D>where
D: UnreliableDrain<DataFormat = QuicDataFormat>,{
main_buffer: BytesMut,
reliable_buffers: SortedVec<Sid, BytesMut>,
store: PrioManager,
next_mid: u64,
closing_streams: Vec<Sid>,
notify_closing_streams: Vec<Sid>,
pending_shutdown: bool,
drain: D,
last: Instant,
metrics: ProtocolMetricCache,
}
Expand description
QUIC implementation of SendProtocol
Fields§
§main_buffer: BytesMut
§reliable_buffers: SortedVec<Sid, BytesMut>
§store: PrioManager
§next_mid: u64
§closing_streams: Vec<Sid>
§notify_closing_streams: Vec<Sid>
§pending_shutdown: bool
§drain: D
§last: Instant
§metrics: ProtocolMetricCache
Implementations§
source§impl<D> QuicSendProtocol<D>where
D: UnreliableDrain<DataFormat = QuicDataFormat>,
impl<D> QuicSendProtocol<D>where
D: UnreliableDrain<DataFormat = QuicDataFormat>,
pub fn new(drain: D, metrics: ProtocolMetricCache) -> Self
sourcepub fn supported_promises() -> Promises
pub fn supported_promises() -> Promises
returns all promises that this Protocol can take care of If you open a Stream anyway, unsupported promises are ignored.
Trait Implementations§
source§impl<D> Debug for QuicSendProtocol<D>
impl<D> Debug for QuicSendProtocol<D>
source§impl<D> ReliableDrain for QuicSendProtocol<D>where
D: UnreliableDrain<DataFormat = QuicDataFormat>,
impl<D> ReliableDrain for QuicSendProtocol<D>where
D: UnreliableDrain<DataFormat = QuicDataFormat>,
source§impl<D> SendProtocol for QuicSendProtocol<D>where
D: UnreliableDrain<DataFormat = QuicDataFormat>,
impl<D> SendProtocol for QuicSendProtocol<D>where
D: UnreliableDrain<DataFormat = QuicDataFormat>,
type CustomErr = <D as UnreliableDrain>::CustomErr
source§fn notify_from_recv(&mut self, event: ProtocolEvent)
fn notify_from_recv(&mut self, event: ProtocolEvent)
YOU MUST inform the
SendProtocol
by any Stream Open BEFORE using it in
send
and Stream Close AFTER using it in send
via this fn.source§fn send<'life0, 'async_trait>(
&'life0 mut self,
event: ProtocolEvent,
) -> Pin<Box<dyn Future<Output = Result<(), ProtocolError<Self::CustomErr>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn send<'life0, 'async_trait>(
&'life0 mut self,
event: ProtocolEvent,
) -> Pin<Box<dyn Future<Output = Result<(), ProtocolError<Self::CustomErr>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Send a Event via this Protocol. The
SendProtocol
MAY require flush
to be called before actual data is send to the respective Sink
.Auto Trait Implementations§
impl<D> Freeze for QuicSendProtocol<D>where
D: Freeze,
impl<D> !RefUnwindSafe for QuicSendProtocol<D>
impl<D> Send for QuicSendProtocol<D>
impl<D> Sync for QuicSendProtocol<D>where
D: Sync,
impl<D> Unpin for QuicSendProtocol<D>where
D: Unpin,
impl<D> !UnwindSafe for QuicSendProtocol<D>
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more