unsigned_varint/lib.rs
1// Copyright 2018-2019 Parity Technologies (UK) Ltd.
2//
3// Permission is hereby granted, free of charge, to any person obtaining a copy of
4// this software and associated documentation files (the "Software"), to deal in
5// the Software without restriction, including without limitation the rights to
6// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
7// the Software, and to permit persons to whom the Software is furnished to do so,
8// subject to the following conditions:
9//
10// The above copyright notice and this permission notice shall be included in all
11// copies or substantial portions of the Software.
12//
13// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
15// FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS
16// OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
17// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
18// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
19
20//! Unsigned varint encodes unsigned integers in 7-bit groups. The most
21//! significant bit (MSB) in each byte indicates if another byte follows
22//! (MSB = 1), or not (MSB = 0).
23
24#![forbid(unsafe_code, unused_imports, unused_variables)]
25#![cfg_attr(not(feature = "std"), no_std)]
26
27pub mod decode;
28pub mod encode;
29
30#[cfg(feature = "std")]
31pub mod io;
32
33#[cfg(feature = "futures")]
34pub mod aio;
35
36#[cfg(any(feature = "codec", feature = "asynchronous_codec"))]
37pub mod codec;
38
39#[cfg(feature = "nom")]
40pub mod nom;