pub struct InfluxDbConverter { /* private fields */ }Expand description
InfluxDB 转换器
Implementations§
Source§impl InfluxDbConverter
impl InfluxDbConverter
pub fn new(config: TimeSeriesConfig) -> Self
pub fn with_default_config() -> Self
Sourcepub fn convert_to_line_protocol(
&self,
data: &HashMap<String, Value>,
mappings: &[FieldMapping],
) -> Result<String>
pub fn convert_to_line_protocol( &self, data: &HashMap<String, Value>, mappings: &[FieldMapping], ) -> Result<String>
转换为 InfluxDB 行协议
Trait Implementations§
Source§impl TimeSeriesConverter for InfluxDbConverter
impl TimeSeriesConverter for InfluxDbConverter
Source§fn convert(
&self,
data: &HashMap<String, Value>,
_mappings: &[FieldMapping],
) -> Result<TimeSeriesPoint>
fn convert( &self, data: &HashMap<String, Value>, _mappings: &[FieldMapping], ) -> Result<TimeSeriesPoint>
转换数据
Source§fn convert_batch(
&self,
data_list: &[HashMap<String, Value>],
mappings: &[FieldMapping],
) -> Result<Vec<TimeSeriesPoint>>
fn convert_batch( &self, data_list: &[HashMap<String, Value>], mappings: &[FieldMapping], ) -> Result<Vec<TimeSeriesPoint>>
批量转换
Auto Trait Implementations§
impl Freeze for InfluxDbConverter
impl RefUnwindSafe for InfluxDbConverter
impl Send for InfluxDbConverter
impl Sync for InfluxDbConverter
impl Unpin for InfluxDbConverter
impl UnsafeUnpin for InfluxDbConverter
impl UnwindSafe for InfluxDbConverter
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more