pub struct DataPointBuilder { /* private fields */ }Expand description
Builder for data point definitions with chainable API.
Implementations§
Source§impl DataPointBuilder
impl DataPointBuilder
Sourcepub fn new(
id: impl Into<String>,
name: impl Into<String>,
data_type: DataType,
) -> Self
pub fn new( id: impl Into<String>, name: impl Into<String>, data_type: DataType, ) -> Self
Create a new data point builder.
Sourcepub fn description(self, description: impl Into<String>) -> Self
pub fn description(self, description: impl Into<String>) -> Self
Set the description.
Sourcepub fn access(self, access: AccessMode) -> Self
pub fn access(self, access: AccessMode) -> Self
Set the access mode.
Sourcepub fn write_only(self) -> Self
pub fn write_only(self) -> Self
Set write-only access.
Sourcepub fn default_value(self, value: impl Into<Value>) -> Self
pub fn default_value(self, value: impl Into<Value>) -> Self
Set the default value.
Sourcepub fn build(self) -> DataPointDef
pub fn build(self) -> DataPointDef
Build the data point definition.
Trait Implementations§
Source§impl Clone for DataPointBuilder
impl Clone for DataPointBuilder
Source§fn clone(&self) -> DataPointBuilder
fn clone(&self) -> DataPointBuilder
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DataPointBuilder
impl Debug for DataPointBuilder
Source§impl From<DataPointBuilder> for DataPointDef
impl From<DataPointBuilder> for DataPointDef
Source§fn from(builder: DataPointBuilder) -> Self
fn from(builder: DataPointBuilder) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for DataPointBuilder
impl RefUnwindSafe for DataPointBuilder
impl Send for DataPointBuilder
impl Sync for DataPointBuilder
impl Unpin for DataPointBuilder
impl UnsafeUnpin for DataPointBuilder
impl UnwindSafe for DataPointBuilder
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