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 into_sealer(
self,
status: u16,
headers: Vec<HeaderField>,
coding: Option<CompressionCoding>,
) -> Result<(ResponseSealer, Vec<u8>), Error>
pub fn into_sealer( self, status: u16, headers: Vec<HeaderField>, coding: Option<CompressionCoding>, ) -> Result<(ResponseSealer, Vec<u8>), Error>
Start one checked response. The returned bytes hold the prefix and START.
§Errors
Returns a validation, entropy, or cryptographic error.
Sourcepub fn into_sealer_with_entropy(
self,
status: u16,
headers: Vec<HeaderField>,
coding: Option<CompressionCoding>,
entropy: &mut impl EntropySource,
) -> Result<(ResponseSealer, Vec<u8>), Error>
pub fn into_sealer_with_entropy( self, status: u16, headers: Vec<HeaderField>, coding: Option<CompressionCoding>, entropy: &mut impl EntropySource, ) -> Result<(ResponseSealer, Vec<u8>), Error>
Start one checked response with an injected entropy source.
§Errors
Returns a validation, entropy, or cryptographic error.
Sourcepub fn protect_finite(self, response: &Response) -> Result<Vec<u8>, Error>
pub fn protect_finite(self, response: &Response) -> Result<Vec<u8>, Error>
Protect one complete finite response with the v2 record writer.
§Errors
Returns a validation, limit, entropy, compression, or cryptographic error.
Sourcepub fn protect_finite_with_entropy(
self,
response: &Response,
entropy: &mut impl EntropySource,
) -> Result<Vec<u8>, Error>
pub fn protect_finite_with_entropy( self, response: &Response, entropy: &mut impl EntropySource, ) -> Result<Vec<u8>, Error>
Protect one complete finite response with injected entropy.
§Errors
Returns a validation, limit, entropy, compression, or cryptographic error.
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