vector_config/external/
toml.rs1use std::cell::RefCell;
2
3use serde_json::Value;
4
5use crate::{
6 schema::{SchemaGenerator, SchemaObject},
7 Configurable, GenerateError, ToValue,
8};
9
10impl Configurable for toml::Value {
11 fn generate_schema(_: &RefCell<SchemaGenerator>) -> Result<SchemaObject, GenerateError> {
12 Ok(SchemaObject::default())
15 }
16}
17
18impl ToValue for toml::Value {
19 fn to_value(&self) -> Value {
20 serde_json::to_value(self).expect("Could not convert TOML value to JSON")
21 }
22}