mirror of
https://github.com/tokio-rs/bytes.git
synced 2026-08-14 00:00:13 +02:00
Reorganize crate
This commit is contained in:
@@ -1,3 +1,7 @@
|
||||
//! Buffer allocation
|
||||
//!
|
||||
//! This module is currently not really in use
|
||||
|
||||
mod heap;
|
||||
|
||||
use std::sync::Arc;
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
use alloc;
|
||||
use buf::{MutBuf};
|
||||
use bytes::Bytes;
|
||||
use {alloc, MutBuf, Bytes};
|
||||
use std::cell::Cell;
|
||||
|
||||
/// A `Buf` backed by a contiguous region of memory.
|
||||
@@ -1,7 +1,7 @@
|
||||
#![allow(warnings)]
|
||||
|
||||
use {Buf, MutBuf, AppendBuf, Bytes};
|
||||
use alloc::{self, /* Pool */};
|
||||
use {alloc, Buf, MutBuf, Bytes};
|
||||
use buf::AppendBuf;
|
||||
use std::{cmp, ptr, slice};
|
||||
use std::io::Cursor;
|
||||
use std::rc::Rc;
|
||||
@@ -4,7 +4,8 @@ pub mod byte;
|
||||
pub mod ring;
|
||||
pub mod take;
|
||||
|
||||
use {Bytes, Take};
|
||||
use {Bytes};
|
||||
use buf::Take;
|
||||
use byteorder::ByteOrder;
|
||||
use std::{cmp, fmt, io, ptr, usize};
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
use buf::{Buf, MutBuf};
|
||||
use {Buf, MutBuf};
|
||||
use std::{cmp};
|
||||
|
||||
#[derive(Debug)]
|
||||
@@ -2,8 +2,7 @@ mod rope;
|
||||
mod seq;
|
||||
mod small;
|
||||
|
||||
use alloc;
|
||||
use buf::Buf;
|
||||
use {alloc, Buf};
|
||||
use self::seq::Seq;
|
||||
use self::small::Small;
|
||||
use self::rope::{Rope, RopeBuf};
|
||||
@@ -1,7 +1,7 @@
|
||||
use {Bytes, MutByteBuf};
|
||||
use buf::{Buf, MutBuf, Source};
|
||||
use bytes::seq::Seq;
|
||||
use bytes::small::{Small};
|
||||
use {Buf, MutBuf, Bytes};
|
||||
use super::seq::Seq;
|
||||
use super::small::{Small};
|
||||
use buf::{Source, MutByteBuf};
|
||||
use std::{cmp, ops};
|
||||
use std::io::Cursor;
|
||||
use std::sync::Arc;
|
||||
@@ -1,7 +1,7 @@
|
||||
//! Immutable set of bytes sequential in memory.
|
||||
|
||||
use {alloc, MutByteBuf, MutBuf};
|
||||
use bytes::{Bytes};
|
||||
use {alloc, MutBuf, Bytes};
|
||||
use buf::{MutByteBuf};
|
||||
use std::ops;
|
||||
use std::io::Cursor;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
use bytes::{Bytes};
|
||||
use {Bytes};
|
||||
use std::ops;
|
||||
use std::io::Cursor;
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
//! Used for internal code structure
|
||||
|
||||
pub mod buf;
|
||||
pub mod bytes;
|
||||
+23
-10
@@ -3,21 +3,34 @@
|
||||
|
||||
#[macro_use]
|
||||
extern crate log;
|
||||
|
||||
extern crate byteorder;
|
||||
|
||||
mod buf;
|
||||
mod bytes;
|
||||
// Implementation in here
|
||||
mod imp;
|
||||
|
||||
pub mod alloc;
|
||||
|
||||
pub use buf::{Buf, MutBuf, Source, Sink, Reader, ReadExt, Writer, WriteExt, Fmt};
|
||||
pub use buf::append::AppendBuf;
|
||||
pub use buf::block::{BlockBuf, BlockBufCursor};
|
||||
pub use buf::byte::{ByteBuf, MutByteBuf};
|
||||
pub use buf::ring::RingBuf;
|
||||
pub use buf::take::Take;
|
||||
pub use bytes::Bytes;
|
||||
pub use imp::buf::{Buf, MutBuf};
|
||||
pub use imp::bytes::Bytes;
|
||||
|
||||
pub mod buf {
|
||||
pub use imp::buf::{
|
||||
Source,
|
||||
Sink,
|
||||
Reader,
|
||||
ReadExt,
|
||||
Writer,
|
||||
WriteExt,
|
||||
Fmt,
|
||||
};
|
||||
pub use imp::buf::append::AppendBuf;
|
||||
pub use imp::buf::block::{BlockBuf, BlockBufCursor};
|
||||
pub use imp::buf::byte::{ByteBuf, MutByteBuf};
|
||||
pub use imp::buf::ring::RingBuf;
|
||||
pub use imp::buf::take::Take;
|
||||
|
||||
pub use imp::bytes::BytesBuf;
|
||||
}
|
||||
|
||||
use std::u32;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user