pub struct ResponseCapability(/* private fields */);Expand description
One-use server capability for protecting the response to one opened request.
Implementations§
Source§impl ResponseCapability
impl ResponseCapability
Sourcepub fn protect(self, response: &Response) -> Result<Vec<u8>, Error>
pub fn protect(self, response: &Response) -> Result<Vec<u8>, Error>
Consume this capability and protect one response with platform entropy.
§Errors
Returns a validation, limit, entropy, compression, or cryptographic error.
Sourcepub fn protect_with_entropy(
self,
response: &Response,
entropy: &mut impl EntropySource,
) -> Result<Vec<u8>, Error>
pub fn protect_with_entropy( self, response: &Response, entropy: &mut impl EntropySource, ) -> Result<Vec<u8>, Error>
Consume this capability and protect one response with injected entropy.
§Errors
Returns a validation, limit, entropy, compression, or cryptographic error before any response envelope is exposed.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ResponseCapability
impl RefUnwindSafe for ResponseCapability
impl Send for ResponseCapability
impl Sync for ResponseCapability
impl Unpin for ResponseCapability
impl UnsafeUnpin for ResponseCapability
impl UnwindSafe for ResponseCapability
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