use tokio::io::{AsyncWrite, AsyncRead};
use std::io::Error;
use std::pin::Pin;
use std::future::Future;
mod element; mod slice; mod vector; mod array; #[cfg(test)]
mod tests;
pub trait AsyncSave {
fn save_as_ne<W>(&self, writer: Pin<&mut W>) -> impl Future<Output = Result<(), Error>> + Send where
W: AsyncWrite + Send;
fn save_as_le<W>(&self, writer: Pin<&mut W>) -> impl Future<Output = Result<(), Error>> + Send where
W: AsyncWrite + Send;
fn save_as_be<W>(&self, writer: Pin<&mut W>) -> impl Future<Output = Result<(), Error>> + Send where
W: AsyncWrite + Send;
}
pub trait AsyncLoad {
fn load_as_ne<R>(reader: Pin<&mut R>) -> impl Future<Output = Result<Self, Error>> + Send where
R: AsyncRead + Send, Self: Sized;
fn load_as_le<R>(reader: Pin<&mut R>) -> impl Future<Output = Result<Self, Error>> + Send where
R: AsyncRead + Send, Self: Sized;
fn load_as_be<R>(reader: Pin<&mut R>) -> impl Future<Output = Result<Self, Error>> + Send where
R: AsyncRead + Send, Self: Sized;
}