vector_config/str.rs
1use vrl::value::KeyString;
2
3use crate::Configurable;
4
5/// A string-like type that can be represented in a Vector configuration.
6///
7/// This is specifically used for constraining the implementation of anything map-like as objects,
8/// which maps are represented by, can only have string-like keys.
9///
10/// If this trait is implemented for a type that is not string-like, things will probably break.
11/// Don't implement this for things that are not string-like.
12pub trait ConfigurableString: Configurable + ToString {}
13
14impl ConfigurableString for String {}
15
16impl ConfigurableString for KeyString {}