pub struct Client(_);Expand description
Http2 client
Implementations§
source§impl Client
impl Client
sourcepub async fn send_request(
&self,
method: Method,
path: ByteString,
headers: HeaderMap,
eof: bool
) -> Result<Stream, OperationError>
pub async fn send_request( &self, method: Method, path: ByteString, headers: HeaderMap, eof: bool ) -> Result<Stream, OperationError>
Send request to the peer
sourcepub fn is_ready(&self) -> bool
pub fn is_ready(&self) -> bool
Check if client is allowed to send new request
Readiness depends on number of opened streams and max concurrency setting
sourcepub async fn ready(&self) -> Result<(), OperationError>
pub async fn ready(&self) -> Result<(), OperationError>
Check client readiness
Client is ready when it is possible to start new stream
sourcepub fn force_close(&self)
pub fn force_close(&self)
Close connection
sourcepub fn on_disconnect(&self) -> OnDisconnect
pub fn on_disconnect(&self) -> OnDisconnect
Notify when connection get closed
Client’s authority
sourcepub fn max_streams(&self) -> Option<u32>
pub fn max_streams(&self) -> Option<u32>
Get max number of active streams
sourcepub fn active_streams(&self) -> u32
pub fn active_streams(&self) -> u32
Get number of active streams
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Client
impl !Send for Client
impl !Sync for Client
impl Unpin for Client
impl !UnwindSafe for Client
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