pub struct EncryptedQueryRequestBuilder<'a, T> { /* private fields */ }Expand description
A request builder that seals query params (ChaCha20-Poly1305) and sends them as
?data=<base64url>.
Obtained from RequestBuilder::encrypted_query. Finalise with
send (async) or
send_sync (sync).
The expected response is also sealed and is opened transparently.
Implementations§
Source§impl<'a, T: Encode> EncryptedQueryRequestBuilder<'a, T>
impl<'a, T: Encode> EncryptedQueryRequestBuilder<'a, T>
Sourcepub async fn send<R>(self) -> Result<R, ClientError>
pub async fn send<R>(self) -> Result<R, ClientError>
Sends the request asynchronously.
The params are sealed with the configured SerializationKey and
base64url-encoded, then appended to the URL as ?data=<base64url>. When the
response arrives, its bytes are opened with the same key to produce R.
Any cipher failure is wrapped in ClientError::Serialization.
Sourcepub fn send_sync<R>(self) -> Result<R, ClientError>
pub fn send_sync<R>(self) -> Result<R, ClientError>
Sends the request synchronously.
Same behaviour as send — params are sealed and base64url-encoded
as ?data=<value>, and the sealed response bytes are opened to R — but the
network call blocks the current thread. Any cipher failure is wrapped in
ClientError::Serialization.