use crate::utils::*;
pub(crate) const NAME: &[&str] = &["tokio01::AsyncWrite"];
pub(crate) fn derive(data: &Data, items: &mut Vec<ItemImpl>) -> Result<()> {
derive_trait!(
data,
parse_quote!(::tokio::io::AsyncWrite)?,
parse_quote! {
trait AsyncWrite: ::std::io::Write {
fn poll_write(&mut self, buf: &[u8]) -> ::tokio::prelude::Poll<usize, ::std::io::Error>;
fn poll_flush(&mut self) -> ::tokio::prelude::Poll<(), ::std::io::Error>;
fn shutdown(&mut self) -> ::tokio::prelude::Poll<(), ::std::io::Error>;
}
}?,
)
.map(|item| items.push(item))
}