Derive some std::fmt::Debug impls. (#1226)

* Derive some `Debug` impls.

* And some more.

Also remove several #[inline] attributes.
This commit is contained in:
Toralf Wittner
2019-08-19 20:15:56 +02:00
committed by GitHub
parent bf8c97049a
commit c0b379b908
4 changed files with 14 additions and 7 deletions

View File

@ -34,6 +34,7 @@ const DEFAULT_BUFFER_SIZE: usize = 64;
/// We purposely only support a frame sizes up to 16KiB (2 bytes unsigned varint
/// frame length). Frames mostly consist in a short protocol name, which is highly
/// unlikely to be more than 16KiB long.
#[derive(Debug)]
pub struct LengthDelimited<R> {
/// The inner I/O resource.
inner: R,
@ -269,6 +270,7 @@ where
/// A `LengthDelimitedReader` implements a `Stream` of uvi-length-delimited
/// frames on an underlying I/O resource combined with direct `AsyncWrite` access.
#[derive(Debug)]
pub struct LengthDelimitedReader<R> {
inner: LengthDelimited<R>
}

View File

@ -36,11 +36,13 @@ use std::{mem, io, fmt, error::Error};
///
/// Reading from a `Negotiated` I/O stream that still has pending negotiation
/// protocol data to send implicitly triggers flushing of all yet unsent data.
#[derive(Debug)]
pub struct Negotiated<TInner> {
state: State<TInner>
}
/// A `Future` that waits on the completion of protocol negotiation.
#[derive(Debug)]
pub struct NegotiatedComplete<TInner> {
inner: Option<Negotiated<TInner>>
}
@ -146,6 +148,7 @@ impl<TInner> Negotiated<TInner> {
}
/// The states of a `Negotiated` I/O stream.
#[derive(Debug)]
enum State<R> {
/// In this state, a `Negotiated` is still expecting to
/// receive confirmation of the protocol it as settled on.

View File

@ -297,6 +297,7 @@ where
/// A `MessageReader` implements a `Stream` of `Message`s on an underlying
/// I/O resource combined with direct `AsyncWrite` access.
#[derive(Debug)]
pub struct MessageReader<R> {
inner: LengthDelimitedReader<R>
}