pub struct HandshakeProvider { /* private fields */ }Expand description
Provider that generates dynamic request headers for each WebSocket handshake. It supports asynchronous and blocking callbacks; clones share the callback, and the SDK converts callback and future panics into classified errors.
Implementations§
Source§impl HandshakeProvider
impl HandshakeProvider
Sourcepub fn new<F, Fut>(provider: F) -> Selfwhere
F: Fn(HandshakeAttempt) -> Fut + Send + Sync + 'static,
Fut: Future<Output = Result<HandshakeHeaders, BoxError>> + Send + 'static,
pub fn new<F, Fut>(provider: F) -> Selfwhere
F: Fn(HandshakeAttempt) -> Fut + Send + Sync + 'static,
Fut: Future<Output = Result<HandshakeHeaders, BoxError>> + Send + 'static,
Creates an asynchronous provider invoked for each handshake attempt.
Callback panics and future polling failures are converted to classified errors.
Trait Implementations§
Source§impl Clone for HandshakeProvider
impl Clone for HandshakeProvider
Auto Trait Implementations§
impl !RefUnwindSafe for HandshakeProvider
impl !UnwindSafe for HandshakeProvider
impl Forget for HandshakeProvider
impl Freeze for HandshakeProvider
impl Move for HandshakeProvider
impl Send for HandshakeProvider
impl Sync for HandshakeProvider
impl Unpin for HandshakeProvider
impl UnsafeUnpin for HandshakeProvider
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