Struct modio_logger_db::MetadataBuilder
source · pub struct MetadataBuilder { /* private fields */ }
Implementations§
source§impl MetadataBuilder
impl MetadataBuilder
Metadata builder, used to slim down code that creates a Metadata object
pub fn new(n: String) -> Self
pub fn name(self, name: String) -> Self
pub fn unit(self, u: String) -> Self
pub fn description(self, description: String) -> Self
pub fn value_map(self, value_map: ValueMap) -> Self
pub fn mode(self, mode: SensorMode) -> Self
pub fn mode_string(self, value: &str) -> Self
sourcepub fn value_map_string(self, value: &str) -> Self
pub fn value_map_string(self, value: &str) -> Self
Parse a value map from a string. Does not return errors as it is assumed that the consumer of such an error would not be happy.
pub fn from_pair(self, tag: &str, value: String) -> Self
pub fn build(self) -> Metadata
Trait Implementations§
Auto Trait Implementations§
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