mod acceptor;
mod body_wrapper;
mod connection;
mod error;
mod frame;
#[cfg(feature = "unstable")]
mod initiator;
mod role;
mod settings;
mod transport;
use crate::headers::compression_error::CompressionError;
pub use acceptor::H2Driver;
pub(crate) use body_wrapper::H2Body;
pub use connection::H2Connection;
#[cfg(feature = "unstable")]
#[doc(hidden)]
pub use connection::{ResponseHeaders, SubmitSend};
pub use error::H2ErrorCode;
#[cfg(feature = "unstable")]
pub use initiator::H2Initiator;
#[cfg(feature = "unstable")]
pub use settings::H2Settings;
#[cfg(not(feature = "unstable"))]
pub(crate) use settings::H2Settings;
pub use transport::H2Transport;
#[derive(thiserror::Error, Debug)]
pub enum H2Error {
#[error(transparent)]
Protocol(#[from] H2ErrorCode),
#[error(transparent)]
Io(#[from] std::io::Error),
}
impl From<CompressionError> for H2Error {
fn from(_: CompressionError) -> Self {
Self::Protocol(H2ErrorCode::CompressionError)
}
}