#![deny(missing_docs)]
mod avro;
mod bytes;
mod gelf;
mod influxdb;
mod json;
mod native;
mod native_json;
mod protobuf;
#[cfg(feature = "syslog")]
mod syslog;
mod vrl;
use ::bytes::Bytes;
pub use avro::{AvroDeserializer, AvroDeserializerConfig, AvroDeserializerOptions};
use dyn_clone::DynClone;
pub use gelf::{GelfDeserializer, GelfDeserializerConfig, GelfDeserializerOptions};
pub use influxdb::{InfluxdbDeserializer, InfluxdbDeserializerConfig};
pub use json::{JsonDeserializer, JsonDeserializerConfig, JsonDeserializerOptions};
pub use native::{NativeDeserializer, NativeDeserializerConfig};
pub use native_json::{
NativeJsonDeserializer, NativeJsonDeserializerConfig, NativeJsonDeserializerOptions,
};
pub use protobuf::{ProtobufDeserializer, ProtobufDeserializerConfig, ProtobufDeserializerOptions};
use smallvec::SmallVec;
#[cfg(feature = "syslog")]
pub use syslog::{SyslogDeserializer, SyslogDeserializerConfig, SyslogDeserializerOptions};
use vector_core::config::LogNamespace;
use vector_core::event::Event;
pub use self::bytes::{BytesDeserializer, BytesDeserializerConfig};
pub use self::vrl::{VrlDeserializer, VrlDeserializerConfig, VrlDeserializerOptions};
pub trait Deserializer: DynClone + Send + Sync {
fn parse(
&self,
bytes: Bytes,
log_namespace: LogNamespace,
) -> vector_common::Result<SmallVec<[Event; 1]>>;
}
dyn_clone::clone_trait_object!(Deserializer);
pub type BoxedDeserializer = Box<dyn Deserializer>;
const fn default_lossy() -> bool {
true
}