pub struct QuicConnPool { /* private fields */ }Available on crate feature
quic only.Expand description
The quic connection pool implementation.
Implementations§
Source§impl QuicConnPool
impl QuicConnPool
Sourcepub fn new_with<A: ToSocketAddrs>(
server_name: Option<&str>,
raddrs: A,
config: Config,
syscall: &'static dyn Network,
) -> Result<Self>
pub fn new_with<A: ToSocketAddrs>( server_name: Option<&str>, raddrs: A, config: Config, syscall: &'static dyn Network, ) -> Result<Self>
Sourcepub fn new<A: ToSocketAddrs>(
server_name: Option<&str>,
raddrs: A,
config: Config,
) -> Result<Self>
pub fn new<A: ToSocketAddrs>( server_name: Option<&str>, raddrs: A, config: Config, ) -> Result<Self>
Sourcepub async fn stream_open(&self) -> Result<QuicStream>
pub async fn stream_open(&self) -> Result<QuicStream>
Open new outbound stream.
This function will randomly select a connection from the pool and open a new outbound stream.
If necessary, a new Quic connection will be created.
If the max_conns is reached, returns the WouldBlock error.
Sourcepub fn set_max_conns(&mut self, value: usize) -> &mut Self
pub fn set_max_conns(&mut self, value: usize) -> &mut Self
Set max_conns parameter.
The default value is 100
Trait Implementations§
Source§impl Clone for QuicConnPool
impl Clone for QuicConnPool
Source§fn clone(&self) -> QuicConnPool
fn clone(&self) -> QuicConnPool
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for QuicConnPool
impl !RefUnwindSafe for QuicConnPool
impl Send for QuicConnPool
impl Sync for QuicConnPool
impl Unpin for QuicConnPool
impl !UnwindSafe for QuicConnPool
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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