Crate tikv_util[−][src]
Modules
| buffer_vec | |
| callback | |
| codec | |
| config | |
| deadline | |
| future | |
| keybuilder | |
| log | |
| logger | |
| lru | |
| macros | The macros crate contains all useful needed macros. |
| metrics | |
| mpsc | This module provides an implementation of mpsc channel based on crossbeam_channel. Comparing to the crossbeam_channel, this implementation supports closed detection and try operations. |
| stream | |
| sys | |
| time | |
| timer | |
| worker |
|
| yatp_pool |
Macros
| box_err | A shortcut to box an error. |
| box_try | Boxes error first, and then does the same thing as |
| count_args | Gets the count of macro’s arguments. |
| crit | Logs a critical level message using the slog global logger. |
| debug | Logs a debug level message using the slog global logger. |
| defer | Simulates Go’s defer. |
| error | Logs a error level message using the slog global logger. /// Use ‘?’ to output error in debug format or ‘%’ to ouput error in display format.
As the third and forth rules shown, the last log field should follow a ‘,’ to seperate the ‘err’ field. eg. |
| error_unknown | |
| impl_display_as_debug | |
| impl_format_delegate_newtype | |
| info | Logs a info level message using the slog global logger. |
| map | Initializes a |
| safe_panic | A safe panic macro that prevents double panic. |
| slow_log | Logs slow operations by |
| thd_name | Makes a thread name with an additional tag inherited from the current thread. |
| trace | Logs a trace level message using the slog global logger. |
| try_opt | Checks |
| try_opt_or | Checks |
| wait_op | Waits for async operation. It returns |
| warn | Logs a warning level message using the slog global logger. |
Structs
| DefaultRng | |
| DeferContext | Invokes the wrapped closure when dropped. |
| MustConsumeVec | |
| RingQueue | A simple ring queue with fixed capacity. |
Enums
| Either | Represents a value of one of two possible types (a more generic Result.) |
Constants
| NO_LIMIT | |
| PANIC_MARK_FILE |
Statics
| PANIC_MARK | |
| PANIC_WHEN_UNEXPECTED_KEY_OR_DATA |
Traits
| AssertClone | |
| AssertCopy | |
| AssertSend | |
| AssertSync | |
| HandyRwLock | A handy shortcut to replace |
| TryInsertWith | A helper trait for |
Functions
| build_on_master_branch | A useful hook to check if master branch is being built. |
| check_environment_variables | Checks environment variables that affect TiKV. |
| create_panic_mark_file | |
| empty_shared_slice | |
| escape | A function to escape a byte array to a readable ascii string. escape rules follow golang/protobuf. https://github.com/golang/protobuf/blob/master/proto/text.go#L578 |
| file_exists | |
| get_tag_from_thread_name | |
| is_even | |
| is_zero_duration | |
| panic_mark_file_exists | |
| panic_mark_file_path | |
| panic_mark_is_on | |
| panic_when_unexpected_key_or_data | |
| set_panic_hook | Exit the whole process when panic. |
| set_panic_mark | |
| set_panic_when_unexpected_key_or_data | |
| slices_in_range | Take slices in the range. |
| unescape | A function to unescape an escaped string to a byte array. |