pub struct ObservableRecord {
pub name: String,
pub kind: ObservableKind,
pub description: String,
pub time_dependent: bool,
pub unit: Option<String>,
pub axes: Vec<String>,
pub sampling: Option<String>,
pub domain: Option<String>,
pub target: Option<String>,
pub extra: Map<String, Value>,
pub data: ObservableData,
}Expand description
Named observable with semantic metadata.
Fields§
§name: String§kind: ObservableKind§description: String§time_dependent: bool§unit: Option<String>§axes: Vec<String>§sampling: Option<String>§domain: Option<String>§target: Option<String>§extra: Map<String, Value>§data: ObservableDataImplementations§
Source§impl ObservableRecord
impl ObservableRecord
Sourcepub fn scalar(name: impl Into<String>, data: Column) -> ObservableRecord
pub fn scalar(name: impl Into<String>, data: Column) -> ObservableRecord
Build a scalar observable.
Sourcepub fn vector(name: impl Into<String>, data: Column) -> ObservableRecord
pub fn vector(name: impl Into<String>, data: Column) -> ObservableRecord
Build a vector observable.
Sourcepub fn validate(&self) -> Result<(), MolRsError>
pub fn validate(&self) -> Result<(), MolRsError>
Validate the observable payload against the declared kind.
Trait Implementations§
Source§impl Clone for ObservableRecord
impl Clone for ObservableRecord
Source§fn clone(&self) -> ObservableRecord
fn clone(&self) -> ObservableRecord
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 moreAuto Trait Implementations§
impl Freeze for ObservableRecord
impl !RefUnwindSafe for ObservableRecord
impl Send for ObservableRecord
impl Sync for ObservableRecord
impl Unpin for ObservableRecord
impl UnsafeUnpin for ObservableRecord
impl !UnwindSafe for ObservableRecord
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