pub struct UnitTestUpgrade { /* private fields */ }Expand description
A handle to an in-progress WebSocket upgrade being processed by the policy.
Use poll to drive the upgrade handshake through
on_http_request_headers and on_http_response_headers.
Implementations§
Source§impl UnitTestUpgrade
impl UnitTestUpgrade
Sourcepub fn poll(&mut self) -> Poll<Result<UpgradeConnection, UnitHttpResponse>>
pub fn poll(&mut self) -> Poll<Result<UpgradeConnection, UnitHttpResponse>>
Advances the upgrade handshake.
Returns Poll::Ready(Ok(conn)) when the upgrade completes,
Poll::Ready(Err(response)) if the policy rejected, or
Poll::Pending if waiting for an async call response.
Trait Implementations§
Source§impl Clone for UnitTestUpgrade
impl Clone for UnitTestUpgrade
Source§fn clone(&self) -> UnitTestUpgrade
fn clone(&self) -> UnitTestUpgrade
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 !RefUnwindSafe for UnitTestUpgrade
impl !Send for UnitTestUpgrade
impl !Sync for UnitTestUpgrade
impl !UnwindSafe for UnitTestUpgrade
impl Freeze for UnitTestUpgrade
impl Unpin for UnitTestUpgrade
impl UnsafeUnpin for UnitTestUpgrade
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