use std::io::Write;
use crate::frame::Frame;

pub trait FrameWritable {
    type Error;
    
    fn write_frame(&mut self, frame: &Frame) -> Result<(), Self::Error>;
}

pub trait FrameReadable {
    type Error;
    
    fn read_frame(&mut self, respond_with_masking: bool, response_stream: &mut impl Write) -> Result<Frame, Self::Error>;
}