pub struct EncryptedQueryBuilder<T> { /* private fields */ }Expand description
Route builder that expects authenticated-encrypted URL query parameters of type T
(ChaCha20-Poly1305).
Obtained from ServerMechanism::encrypted_query. The client must send a single
?data=<base64url> query parameter. Any failure returns 403 Forbidden.
Optionally attach shared state via state before
finalising with onconnect.
Implementations§
Source§impl<T> EncryptedQueryBuilder<T>
impl<T> EncryptedQueryBuilder<T>
Sourcepub fn onconnect<F, Fut, Re>(self, handler: F) -> SocketType
pub fn onconnect<F, Fut, Re>(self, handler: F) -> SocketType
Finalises this route with an async handler that receives the decrypted query
parameters as T.
Sourcepub fn state<S: Clone + Send + Sync + 'static>(
self,
state: S,
) -> StatefulEncryptedQueryBuilder<T, S>
pub fn state<S: Clone + Send + Sync + 'static>( self, state: S, ) -> StatefulEncryptedQueryBuilder<T, S>
Attaches shared state S, transitioning to StatefulEncryptedQueryBuilder.
Auto Trait Implementations§
impl<T> Freeze for EncryptedQueryBuilder<T>
impl<T> RefUnwindSafe for EncryptedQueryBuilder<T>where
T: RefUnwindSafe,
impl<T> Send for EncryptedQueryBuilder<T>where
T: Send,
impl<T> Sync for EncryptedQueryBuilder<T>where
T: Sync,
impl<T> Unpin for EncryptedQueryBuilder<T>where
T: Unpin,
impl<T> UnsafeUnpin for EncryptedQueryBuilder<T>
impl<T> UnwindSafe for EncryptedQueryBuilder<T>where
T: UnwindSafe,
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