diff --git a/packages/yew/src/server_renderer.rs b/packages/yew/src/server_renderer.rs index 6c0b271a707..2fbd13e628f 100644 --- a/packages/yew/src/server_renderer.rs +++ b/packages/yew/src/server_renderer.rs @@ -334,49 +334,4 @@ where rx } - - /// Renders Yew Application into a string Stream. - /// - /// It would return a stream that yields a string for each rendered chunk. - pub async fn render_stream_async(self) -> impl Stream { - let Self { - create_props, - hydratable, - .. - } = self; - - let props = create_props(); - LocalServerRenderer::::with_props(props) - .hydratable(hydratable) - .render_stream() - } - - /// Renders Yew Application into a string. - /// - /// This method completely transfers the asynchronous control to the user, - /// and will not try to create additional async runtime tasks in the environment internally. - /// It's most suitable for single-threaded environments such as WASI. - pub async fn render_async(self) -> String { - let s = self.render_stream_async(); - futures::pin_mut!(s); - - s.await.collect::().await - } - - /// Renders Yew Application into a string. - /// - /// This method completely transfers the asynchronous control to the user, - /// and will not try to create additional async runtime tasks in the environment internally. - /// It's most suitable for single-threaded environments such as WASI. - pub async fn render_to_string_async(self, w: &mut String) { - let s = self.render_stream_async(); - futures::pin_mut!(s); - - s.await - .for_each(|m| { - w.push_str(&m); - async {} - }) - .await; - } }