pub struct ResponseSealer { /* private fields */ }Expand description
One response writer. Its key and sequence cannot be reused after failure.
Implementations§
Source§impl ResponseSealer
impl ResponseSealer
Sourcepub const fn head_mode(&self) -> ResponseMode
pub const fn head_mode(&self) -> ResponseMode
Return the checked response mode.
Sourcepub fn seal_sse_block(&mut self, block: &[u8]) -> Result<Vec<u8>, Error>
pub fn seal_sse_block(&mut self, block: &[u8]) -> Result<Vec<u8>, Error>
Protect one complete SSE block, including its final blank line.
§Errors
Returns a shape, limit, or cryptographic error and closes the writer.
Sourcepub fn seal_finite_body(
&mut self,
body: &[u8],
) -> Result<Option<Vec<u8>>, Error>
pub fn seal_finite_body( &mut self, body: &[u8], ) -> Result<Option<Vec<u8>>, Error>
Protect the complete logical finite body. An empty body emits no DATA.
§Errors
Returns a validation, limit, or cryptographic error and closes the writer.
Auto Trait Implementations§
impl Freeze for ResponseSealer
impl RefUnwindSafe for ResponseSealer
impl Send for ResponseSealer
impl Sync for ResponseSealer
impl Unpin for ResponseSealer
impl UnsafeUnpin for ResponseSealer
impl UnwindSafe for ResponseSealer
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