pub struct StreamingRestoreContext<'a> { /* private fields */ }Expand description
Incrementally restores one decoded logical text stream.
Create a separate context for each logical stream. JSON string escapes must be decoded before
calling push_str; serialize the restored text again after restoration. This type does not
parse bytes, JSON framing, SSE, HTTP, or any other transport framing.
Implementations§
Source§impl<'a> StreamingRestoreContext<'a>
impl<'a> StreamingRestoreContext<'a>
pub fn new(session: &'a RedactionSession) -> Self
pub fn with_permits( session: &'a RedactionSession, permits: &[RestorePermit], ) -> Result<Self>
pub fn push_str(&mut self, fragment: &str) -> RestoreResult
pub fn finish(self) -> RestoreResult
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for StreamingRestoreContext<'a>
impl<'a> RefUnwindSafe for StreamingRestoreContext<'a>
impl<'a> Send for StreamingRestoreContext<'a>
impl<'a> Sync for StreamingRestoreContext<'a>
impl<'a> Unpin for StreamingRestoreContext<'a>
impl<'a> UnsafeUnpin for StreamingRestoreContext<'a>
impl<'a> UnwindSafe for StreamingRestoreContext<'a>
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