2015-02-09 09:04:18 -08:00
|
|
|
# Bytes
|
|
|
|
|
|
|
|
|
|
A utility library for working with bytes.
|
2015-02-09 21:33:00 -08:00
|
|
|
|
2017-02-20 14:31:26 -08:00
|
|
|
[](https://crates.io/crates/bytes)
|
2015-02-09 21:33:00 -08:00
|
|
|
[](https://travis-ci.org/carllerche/bytes)
|
|
|
|
|
|
2017-02-20 14:33:35 -08:00
|
|
|
[Documentation](https://carllerche.github.io/bytes/bytes/index.html)
|
2015-02-09 22:47:53 -08:00
|
|
|
|
2015-02-09 21:33:00 -08:00
|
|
|
## Usage
|
|
|
|
|
|
|
|
|
|
To use `bytes`, first add this to your `Cargo.toml`:
|
|
|
|
|
|
|
|
|
|
```toml
|
2017-02-20 14:31:26 -08:00
|
|
|
[dependencies]
|
|
|
|
|
bytes = "0.4"
|
2015-02-09 21:33:00 -08:00
|
|
|
```
|
2017-02-20 14:31:26 -08:00
|
|
|
|
|
|
|
|
Next, add this to your crate:
|
|
|
|
|
|
|
|
|
|
```rust
|
|
|
|
|
extern crate bytes;
|
|
|
|
|
|
|
|
|
|
use bytes::{Bytes, BytesMut, Buf, BufMut};
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
# License
|
|
|
|
|
|
|
|
|
|
`bytes` is primarily distributed under the terms of both the MIT license and the
|
|
|
|
|
Apache License (Version 2.0), with portions covered by various BSD-like
|
|
|
|
|
licenses.
|
|
|
|
|
|
|
|
|
|
See LICENSE-APACHE, and LICENSE-MIT for details.
|