pub struct StateSnapshotBuilder { /* private fields */ }Expand description
Builder for constructing StateSnapshot instances.
Implementations§
Source§impl StateSnapshotBuilder
impl StateSnapshotBuilder
Sourcepub fn updated_at(self, unix_ms: i64) -> Self
pub fn updated_at(self, unix_ms: i64) -> Self
Set the timestamp (Unix milliseconds).
Sourcepub fn confidence(self, confidence: f32) -> Self
pub fn confidence(self, confidence: f32) -> Self
Set the confidence level.
Sourcepub fn axes(self, axes: impl IntoIterator<Item = (String, f32)>) -> Self
pub fn axes(self, axes: impl IntoIterator<Item = (String, f32)>) -> Self
Add multiple axis values from an iterator.
Sourcepub fn build(self) -> Result<StateSnapshot, ValidationError>
pub fn build(self) -> Result<StateSnapshot, ValidationError>
Build the StateSnapshot, validating all fields.
Trait Implementations§
Source§impl Default for StateSnapshotBuilder
impl Default for StateSnapshotBuilder
Source§fn default() -> StateSnapshotBuilder
fn default() -> StateSnapshotBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for StateSnapshotBuilder
impl RefUnwindSafe for StateSnapshotBuilder
impl Send for StateSnapshotBuilder
impl Sync for StateSnapshotBuilder
impl Unpin for StateSnapshotBuilder
impl UnwindSafe for StateSnapshotBuilder
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more