1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#![cfg_attr(test, feature(test))]
#![feature(cell_update)]
#![feature(shrink_to)]
#![feature(div_duration)]
#![feature(min_specialization)]
#![feature(box_patterns)]
#![feature(vecdeque_binary_search)]
#[cfg(test)]
extern crate test;
pub mod coprocessor;
pub mod errors;
pub mod router;
pub mod store;
pub use self::coprocessor::{RegionInfo, RegionInfoAccessor, SeekRegionCallback};
pub use self::errors::{DiscardReason, Error, Result};
#[cfg(feature = "protobuf-codec")]
fn bytes_capacity(b: &bytes::Bytes) -> usize {
b.len()
}
#[cfg(feature = "prost-codec")]
fn bytes_capacity(b: &Vec<u8>) -> usize {
b.capacity()
}