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
15pub use vector_common_macros::NamedInternalEvent;
16
17#[cfg(feature = "btreemap")]
18pub use vrl::btreemap;
19
20#[cfg(feature = "byte_size_of")]
21pub mod byte_size_of;
22
23pub mod json_size;
24
25pub mod config;
26
27pub mod constants;
28
29#[cfg(feature = "conversion")]
30pub use vrl::compiler::TimeZone;
31
32#[cfg(feature = "encoding")]
33pub mod encode_logfmt {
34    pub use vrl::core::encode_logfmt::*;
35}
36
37pub mod conversion {
38    pub use vrl::compiler::conversion::*;
39}
40
41pub mod event_data_eq;
42pub use event_data_eq::EventDataEq;
43
44#[cfg(any(test, feature = "test"))]
45pub mod event_test_util;
46
47pub mod finalization;
48pub mod finalizer;
49pub use finalizer::EmptyStream;
50
51pub mod id;
52
53pub mod internal_event;
54
55pub mod request_metadata;
56
57pub mod shutdown;
58
59#[cfg(feature = "sensitive_string")]
60pub mod sensitive_string;
61
62pub mod atomic;
63pub mod stats;
64pub mod trigger;
65
66#[macro_use]
67extern crate tracing;
68
69/// Vector's basic error type, dynamically dispatched and safe to send across
70/// threads.
71pub type Error = Box<dyn std::error::Error + Send + Sync + 'static>;
72
73/// Vector's basic result type, defined in terms of [`Error`] and generic over
74/// `T`.
75pub type Result<T> = std::result::Result<T, Error>;