pub struct StreamingResponse<'a, W: FlushWriter + ?Sized> { /* private fields */ }Expand description
A host-controlled progressive HTML response.
Each method synchronously borrows only the state value supplied to that call. The host may await backend work between calls while this response retains renderer inventory, transport backpressure, and hydration metadata.
Implementations§
Source§impl<'a, W: FlushWriter + ?Sized> StreamingResponse<'a, W>
impl<'a, W: FlushWriter + ?Sized> StreamingResponse<'a, W>
Sourcepub fn boundary(&self, name: &str) -> Result<BoundaryId>
pub fn boundary(&self, name: &str) -> Result<BoundaryId>
Resolve a free-form authored name to an integer response handle.
§Errors
Returns an actionable error with valid names and a typo suggestion when
the entry does not declare name.
Sourcepub fn boundary_count(&self) -> usize
pub fn boundary_count(&self) -> usize
Number of compile-time boundaries in this entry.
Sourcepub fn write_shell(&mut self, state: &Value) -> Result<()>
pub fn write_shell(&mut self, state: &Value) -> Result<()>
Render and flush the document prefix before the first boundary.
Sourcepub fn write_boundary(
&mut self,
boundary: BoundaryId,
state: &Value,
mode: BoundaryMode,
) -> Result<()>
pub fn write_boundary( &mut self, boundary: BoundaryId, state: &Value, mode: BoundaryMode, ) -> Result<()>
Render, commit, and flush the next compile-time boundary.
Auto Trait Implementations§
impl<'a, W> !RefUnwindSafe for StreamingResponse<'a, W>
impl<'a, W> !Send for StreamingResponse<'a, W>
impl<'a, W> !Sync for StreamingResponse<'a, W>
impl<'a, W> !UnwindSafe for StreamingResponse<'a, W>
impl<'a, W> Freeze for StreamingResponse<'a, W>where
W: ?Sized,
impl<'a, W> Unpin for StreamingResponse<'a, W>where
W: ?Sized,
impl<'a, W> UnsafeUnpin for StreamingResponse<'a, W>where
W: ?Sized,
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