pub struct Client { /* private fields */ }Expand description
Http2 client
Implementations
sourceimpl 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 fn set_scheme(&mut self, scheme: Scheme)
pub fn set_scheme(&mut self, scheme: Scheme)
Set client’s secure state
Set client’s authority
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 on_disconnect(&self) -> OnDisconnect
pub fn on_disconnect(&self) -> OnDisconnect
Notify when connection get closed
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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more