use crate::{ types::{DatabaseRowMutation, DatabaseRowTransformResult}, Result, }; pub trait DataPollResult { fn data(&self) -> &[T]; } pub trait DataCompletion { type DataPollResult: DataPollResult; fn status(&self) -> Result>; fn poll_data(&self) -> Result>; fn is_done(&self) -> Result; } pub trait ProtocolIO { type DataCompletionBytes: DataCompletion; type DataCompletionTransform: DataCompletion; fn full_read(&self, path: &str) -> Result; fn full_write(&self, path: &str, content: Vec) -> Result; fn transform( &self, mutations: Vec, ) -> Result; fn http( &self, method: &str, path: &str, body: Option>, headers: &[(&str, &str)], ) -> Result; }