pub struct Connection { /* private fields */ }Implementations§
Source§impl Connection
impl Connection
pub fn new(role: Role, limits: Limits) -> Result<Self>
Sourcepub fn set_settings_deadline(&mut self, deadline: Option<Instant>)
pub fn set_settings_deadline(&mut self, deadline: Option<Instant>)
Host-supplied SETTINGS acknowledgement deadline; no clock is sampled.
pub fn next_timeout(&self) -> Option<Instant>
pub fn handle_timeout(&mut self, now: Instant) -> Option<Error>
Sourcepub fn poll_failed_stream(&mut self) -> Option<u32>
pub fn poll_failed_stream(&mut self) -> Option<u32>
Exactly one terminal result for each still-open stream after connection failure. Fully ended/reset streams have already produced their terminal event.
pub fn output(&self) -> &[u8] ⓘ
pub fn consume_output(&mut self, n: usize) -> Result<()>
pub fn open(&mut self, headers: &[Header], end_stream: bool) -> Result<u32>
pub fn send_headers( &mut self, id: u32, headers: &[Header], end_stream: bool, ) -> Result<()>
Sourcepub fn send_data(
&mut self,
id: u32,
bytes: &[u8],
end_stream: bool,
) -> Result<usize>
pub fn send_data( &mut self, id: u32, bytes: &[u8], end_stream: bool, ) -> Result<usize>
Returns accepted bytes (zero on flow-control stall). Host retains remainder.
pub fn release_capacity(&mut self, id: u32, n: u32) -> Result<()>
pub fn reset(&mut self, id: u32, code: u32) -> Result<()>
pub fn ping(&mut self, data: [u8; 8]) -> Result<()>
pub fn shutdown(&mut self) -> Result<()>
pub fn is_drained(&self) -> bool
pub fn receive<'a>(&mut self, input: &'a [u8]) -> Result<Step<'a>>
Auto Trait Implementations§
impl Freeze for Connection
impl RefUnwindSafe for Connection
impl Send for Connection
impl Sync for Connection
impl Unpin for Connection
impl UnsafeUnpin for Connection
impl UnwindSafe for Connection
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