cita_util/
lib.rs

1// Copyright Rivtower Technologies LLC.
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7// http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15extern crate ansi_term;
16extern crate cita_types as types;
17extern crate git2;
18extern crate parking_lot;
19extern crate rustc_version;
20pub extern crate tiny_keccak as sha3;
21
22extern crate serde;
23extern crate toml;
24
25extern crate backtrace;
26#[macro_use]
27extern crate cita_logger as logger;
28
29pub mod build_info;
30pub mod instrument;
31#[macro_use]
32pub mod init;
33pub mod panic_hook;
34
35pub use crate::init::*;
36pub use crate::instrument::*;
37pub use ansi_term::{Colour, Style};
38pub use panic_hook::set_panic_handler;
39pub use parking_lot::{Condvar, Mutex, MutexGuard, RwLock, RwLockReadGuard, RwLockWriteGuard};
40
41pub const BLOCKLIMIT: u64 = 100;
42
43/// Boolean type for clean/dirty status.
44#[derive(PartialEq, Eq, Clone, Copy, Debug)]
45pub enum Filth {
46    /// Data has not been changed.
47    Clean,
48    /// Data has been changed.
49    Dirty,
50}