More restructuring
This commit is contained in:
23
src/lib.rs
23
src/lib.rs
@@ -30,11 +30,10 @@ pub mod error;
|
||||
mod hpack;
|
||||
mod proto;
|
||||
mod frame;
|
||||
pub mod server;
|
||||
// pub mod server;
|
||||
|
||||
pub use error::{ConnectionError, Reason};
|
||||
pub use frame::StreamId;
|
||||
pub use proto::Connection;
|
||||
|
||||
use bytes::Bytes;
|
||||
|
||||
@@ -68,23 +67,3 @@ pub enum Frame<T, B = Bytes> {
|
||||
error: Reason,
|
||||
},
|
||||
}
|
||||
|
||||
/// Either a Client or a Server
|
||||
pub trait Peer {
|
||||
/// Message type sent into the transport
|
||||
type Send;
|
||||
|
||||
/// Message type polled from the transport
|
||||
type Poll;
|
||||
|
||||
fn is_server() -> bool;
|
||||
|
||||
#[doc(hidden)]
|
||||
fn convert_send_message(
|
||||
id: StreamId,
|
||||
headers: Self::Send,
|
||||
end_of_stream: bool) -> frame::Headers;
|
||||
|
||||
#[doc(hidden)]
|
||||
fn convert_poll_message(headers: frame::Headers) -> Self::Poll;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user