Files
bytes/src/lib.rs
T

55 lines
738 B
Rust
Raw Normal View History

2015-01-30 00:04:33 -08:00
#![crate_name = "bytes"]
#![deny(warnings)]
2015-04-07 23:40:00 -07:00
pub mod alloc;
2015-09-25 09:43:58 -07:00
pub mod buf;
pub mod str;
2015-04-07 23:40:00 -07:00
pub use buf::{
Buf,
BufExt,
MutBuf,
MutBufExt,
ByteBuf,
MutByteBuf,
RingBuf,
ROByteBuf,
SliceBuf,
MutSliceBuf,
Source,
2015-07-28 12:51:24 -07:00
Sink,
Take,
2015-04-07 23:40:00 -07:00
};
pub use str::{
ByteStr,
Bytes,
Rope,
RopeBuf,
SeqByteStr,
SmallByteStr,
SmallByteStrBuf,
ToBytes,
};
use std::u32;
pub mod traits {
2015-02-11 10:04:31 -08:00
//! All traits are re-exported here to allow glob imports.
pub use {Buf, BufExt, MutBuf, MutBufExt, ByteStr, ToBytes};
}
const MAX_CAPACITY: usize = u32::MAX as usize;
2015-01-30 00:04:33 -08:00
2015-02-16 20:27:40 -08:00
/*
*
2015-02-11 10:04:31 -08:00
* ===== BufError =====
*
*/
2015-04-03 22:46:10 +02:00
#[derive(Copy, Clone, Debug)]
pub enum BufError {
Underflow,
Overflow,
}