use crate::driver::ArchiveFile; use crate::ArchiveResult; use std::error::Error; use std::io::{Read, Write}; pub trait Driver: Sized { type Error: Error; type IO; type File: ArchiveFile; } pub trait ArchiveRead: Driver where Self::IO: Read, { // Create driver instance fn read(io: Self::IO) -> ArchiveResult; } pub trait ArchiveWrite: ArchiveRead where Self::IO: Read + Write, { }