pub struct MetadataBuilder { /* private fields */ }Expand description
Builder for constructing metadata
Implementations§
Source§impl MetadataBuilder
impl MetadataBuilder
Sourcepub fn datetime_now(self, key: impl Into<String>) -> Self
pub fn datetime_now(self, key: impl Into<String>) -> Self
Add datetime field (now)
Add tags field
Sourcepub fn enum_value(
self,
key: impl Into<String>,
value: impl Into<String>,
options: Vec<String>,
) -> Result<Self>
pub fn enum_value( self, key: impl Into<String>, value: impl Into<String>, options: Vec<String>, ) -> Result<Self>
Add enum field
Sourcepub fn qualitative(
self,
key: impl Into<String>,
value: impl Into<String>,
scale: Vec<String>,
) -> Result<Self>
pub fn qualitative( self, key: impl Into<String>, value: impl Into<String>, scale: Vec<String>, ) -> Result<Self>
Add qualitative field
Sourcepub fn quantitative(
self,
key: impl Into<String>,
value: f64,
unit: impl Into<String>,
) -> Self
pub fn quantitative( self, key: impl Into<String>, value: f64, unit: impl Into<String>, ) -> Self
Add quantitative field
Sourcepub fn build(self) -> UserMetadata
pub fn build(self) -> UserMetadata
Build the metadata
Trait Implementations§
Auto Trait Implementations§
impl Freeze for MetadataBuilder
impl RefUnwindSafe for MetadataBuilder
impl Send for MetadataBuilder
impl Sync for MetadataBuilder
impl Unpin for MetadataBuilder
impl UnwindSafe for MetadataBuilder
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