vector_common/
lib.rs

1//! The Vector Core common library
2//!
3//! This library includes common functionality relied upon by vector-core
4//! and core-related crates (e.g. buffers).
5
6#![deny(warnings)]
7#![deny(clippy::all)]
8#![deny(clippy::pedantic)]
9#![deny(unreachable_pub)]
10#![deny(unused_allocation)]
11#![deny(unused_extern_crates)]
12#![deny(unused_assignments)]
13#![deny(unused_comparisons)]
14
15#[cfg(feature = "btreemap")]
16pub use vrl::btreemap;
17
18#[cfg(feature = "byte_size_of")]
19pub mod byte_size_of;
20
21pub mod json_size;
22
23pub mod config;
24
25pub mod constants;
26
27#[cfg(feature = "conversion")]
28pub use vrl::compiler::TimeZone;
29
30#[cfg(feature = "encoding")]
31pub mod encode_logfmt {
32    pub use vrl::core::encode_logfmt::*;
33}
34
35pub mod conversion {
36    pub use vrl::compiler::conversion::*;
37}
38
39pub mod event_data_eq;
40pub use event_data_eq::EventDataEq;
41
42#[cfg(any(test, feature = "test"))]
43pub mod event_test_util;
44
45pub mod finalization;
46pub mod finalizer;
47pub use finalizer::EmptyStream;
48
49pub mod id;
50
51pub mod internal_event;
52
53pub mod request_metadata;
54
55pub mod shutdown;
56
57#[cfg(feature = "sensitive_string")]
58pub mod sensitive_string;
59
60pub mod trigger;
61
62#[macro_use]
63extern crate tracing;
64
65/// Vector's basic error type, dynamically dispatched and safe to send across
66/// threads.
67pub type Error = Box<dyn std::error::Error + Send + Sync + 'static>;
68
69/// Vector's basic result type, defined in terms of [`Error`] and generic over
70/// `T`.
71pub type Result<T> = std::result::Result<T, Error>;