use futures::{AsyncWrite, Sink}; use crate::{ element::{Element, Name, Namespace}, error::Error, }; pub struct Writer { stream: W, depth: Vec, namespaces: Vec<(usize, Namespace)>, } impl Writer { pub async fn write(&self, element: impl Into) -> Result<(), Error> {} pub async fn write_start(&self, element: impl Into) -> Result<(), Error> {} pub async fn write_end(&self) -> Result<(), Error> {} } impl> Sink for Writer { type Error = Error; fn poll_ready( self: std::pin::Pin<&mut Self>, cx: &mut std::task::Context<'_>, ) -> std::task::Poll> { todo!() } fn start_send(self: std::pin::Pin<&mut Self>, item: E) -> Result<(), Self::Error> { todo!() } fn poll_flush( self: std::pin::Pin<&mut Self>, cx: &mut std::task::Context<'_>, ) -> std::task::Poll> { todo!() } fn poll_close( self: std::pin::Pin<&mut Self>, cx: &mut std::task::Context<'_>, ) -> std::task::Poll> { todo!() } }