pub enum Connection<Front: SocketHandler> {
H1(ConnectionH1<Front>),
H2(ConnectionH2<Front>),
}Variants§
H1(ConnectionH1<Front>)
H2(ConnectionH2<Front>)
Implementations§
Source§impl<Front: SocketHandler> Connection<Front>
impl<Front: SocketHandler> Connection<Front>
pub fn new_h1_server( session_ulid: Ulid, front_stream: Front, timeout_container: TimeoutContainer, ) -> Connection<Front>
pub fn new_h1_client( session_ulid: Ulid, front_stream: Front, cluster_id: String, backend: Rc<RefCell<Backend>>, timeout_container: TimeoutContainer, ) -> Connection<Front>
pub fn new_h2_server( session_ulid: Ulid, front_stream: Front, pool: Weak<RefCell<Pool>>, timeout_container: TimeoutContainer, flood_config: H2FloodConfig, connection_config: H2ConnectionConfig, stream_idle_timeout: Duration, graceful_shutdown_deadline: Option<Duration>, ) -> Option<Connection<Front>>
pub fn new_h2_client( session_ulid: Ulid, front_stream: Front, cluster_id: String, backend: Rc<RefCell<Backend>>, pool: Weak<RefCell<Pool>>, timeout_container: TimeoutContainer, flood_config: H2FloodConfig, connection_config: H2ConnectionConfig, stream_idle_timeout: Duration, graceful_shutdown_deadline: Option<Duration>, ) -> Option<Connection<Front>>
pub fn readiness(&self) -> &Readiness
pub fn readiness_mut(&mut self) -> &mut Readiness
pub fn position(&self) -> &Position
pub fn position_mut(&mut self) -> &mut Position
pub fn socket(&self) -> &TcpStream
pub fn socket_mut(&mut self) -> &mut TcpStream
pub fn timeout_container(&mut self) -> &mut TimeoutContainer
Sourcepub fn overhead_bytes(&self) -> (usize, usize)
pub fn overhead_bytes(&self) -> (usize, usize)
Returns connection-level byte overhead (bin, bout) for H2, (0, 0) for H1.
Trait Implementations§
Auto Trait Implementations§
impl<Front> !RefUnwindSafe for Connection<Front>
impl<Front> !Send for Connection<Front>
impl<Front> !Sync for Connection<Front>
impl<Front> !UnwindSafe for Connection<Front>
impl<Front> Freeze for Connection<Front>where
Front: Freeze,
impl<Front> Unpin for Connection<Front>where
Front: Unpin,
impl<Front> UnsafeUnpin for Connection<Front>where
Front: UnsafeUnpin,
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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