Skip to main content

tikv_client/kv/
value.rs

1// Copyright 2019 TiKV Project Authors. Licensed under Apache-2.0.
2
3const _PROPTEST_VALUE_MAX: usize = 1024 * 16; // 16 KB
4
5/// The value part of a key/value pair. An alias for `Vec<u8>`.
6///
7/// In TiKV, a value is an ordered sequence of bytes. This has an advantage over choosing `String`
8/// as valid `UTF-8` is not required. This means that the user is permitted to store any data they wish,
9/// as long as it can be represented by bytes. (Which is to say, pretty much anything!)
10///
11/// Since `Value` is just an alias for `Vec<u8>`, conversions to and from it are easy.
12///
13/// Many functions which accept a `Value` accept an `Into<Value>`.
14pub type Value = Vec<u8>;