pub struct HtmlRenderContext<W: Write> {
pub writer: W,
/* private fields */
}Fields§
§writer: WImplementations§
Source§impl<W: Write> HtmlRenderContext<W>
impl<W: Write> HtmlRenderContext<W>
pub async fn new( app_state: Arc<AppState>, request_context: RequestContext, writer: W, initial_row: JsonValue, ) -> Result<HtmlRenderContext<W>>
pub fn handle_row<'life0, 'life_self, 'async_recursion>(
&'life_self mut self,
data: &'life0 JsonValue,
) -> Pin<Box<dyn Future<Output = Result<()>> + 'async_recursion>>where
'life0: 'async_recursion,
'life_self: 'async_recursion,
pub async fn finish_query(&mut self) -> Result<()>
Sourcepub async fn handle_error(&mut self, error: &Error) -> Result<()>
pub async fn handle_error(&mut self, error: &Error) -> Result<()>
Handles the rendering of an error. Returns whether the error is irrecoverable and the rendering must stop
pub async fn handle_result<R>(&mut self, result: &Result<R>) -> Result<()>
pub async fn handle_result_and_log<R>(&mut self, result: &Result<R>)
pub async fn close(self) -> W
Auto Trait Implementations§
impl<W> Freeze for HtmlRenderContext<W>where
W: Freeze,
impl<W> !RefUnwindSafe for HtmlRenderContext<W>
impl<W> Send for HtmlRenderContext<W>where
W: Send,
impl<W> Sync for HtmlRenderContext<W>where
W: Sync,
impl<W> Unpin for HtmlRenderContext<W>where
W: Unpin,
impl<W> !UnwindSafe for HtmlRenderContext<W>
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more