stream_io/standard/
mod.rs

1#![allow(unused_variables)]
2use crate::{BigEndian, ByteOrder, LittleEndian};
3use byteorder::{ReadBytesExt, WriteBytesExt};
4use std::{
5    collections::VecDeque,
6    io::{Read, Result, Write},
7};
8
9mod reader;
10mod writer;
11
12pub trait StreamReader: Sized {
13    /// Reads something from the specified buffer using the specified byte order.
14    fn read_from<R: Read>(buffer: &mut R, order: ByteOrder) -> Result<Self>;
15}
16
17pub trait StreamWriter: Sized {
18    /// Writes something to the specified buffer using the specified byte order.
19    fn write_to<W: Write>(&self, buffer: &mut W, order: ByteOrder) -> Result<()>;
20}