Struct influxdb2::models::data_point::DataPointBuilder
source · [−]pub struct DataPointBuilder { /* private fields */ }
Expand description
Incrementally constructs a DataPoint
.
Create this via DataPoint::builder
.
Implementations
sourceimpl DataPointBuilder
impl DataPointBuilder
sourcepub fn tag(self, name: impl Into<String>, value: impl Into<String>) -> Self
pub fn tag(self, name: impl Into<String>, value: impl Into<String>) -> Self
Sets a tag, replacing any existing tag of the same name.
sourcepub fn field(self, name: impl Into<String>, value: impl Into<FieldValue>) -> Self
pub fn field(self, name: impl Into<String>, value: impl Into<FieldValue>) -> Self
Sets a field, replacing any existing field of the same name.
sourcepub fn timestamp(self, value: i64) -> Self
pub fn timestamp(self, value: i64) -> Self
Sets the timestamp, replacing any existing timestamp.
The value is treated as the number of nanoseconds since the UNIX epoch.
sourcepub fn build(self) -> Result<DataPoint, DataPointError>
pub fn build(self) -> Result<DataPoint, DataPointError>
Constructs the data point
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for DataPointBuilder
impl Send for DataPointBuilder
impl Sync for DataPointBuilder
impl Unpin for DataPointBuilder
impl UnwindSafe for DataPointBuilder
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more