pub struct ObservationPlan { /* private fields */ }Expand description
An immutable application definition of scientific observation.
Implementations§
Source§impl ObservationPlan
impl ObservationPlan
Sourcepub fn all_fields() -> Self
pub fn all_fields() -> Self
Defines one inferred stream named state containing every state field.
This declaration is infallible. Binding later rejects an empty state schema because every observation stream must contain at least one field.
Sourcepub fn fields<I, S>(fields: I) -> Result<Self, ObservationError>
pub fn fields<I, S>(fields: I) -> Result<Self, ObservationError>
Defines one inferred stream named state containing selected fields.
Field names are trimmed and must be nonempty and unique. Their existence is checked later against the execution unit’s state schema.
§Errors
Returns ObservationError::EmptyFieldName,
ObservationError::EmptyFieldSelection, or
ObservationError::DuplicateField for an invalid declaration.
Sourcepub fn streams<I>(streams: I) -> Result<Self, ObservationError>where
I: IntoIterator<Item = ObservationStream>,
pub fn streams<I>(streams: I) -> Result<Self, ObservationError>where
I: IntoIterator<Item = ObservationStream>,
Defines several explicitly named scientific streams.
Definition order is retained. Stream constructors already normalize names; this operation rejects an empty plan and repeated normalized names.
§Errors
Returns ObservationError::EmptyPlan or
ObservationError::DuplicateStreamName.
Sourcepub fn with_iteration_unit(
self,
unit: impl Into<String>,
) -> Result<Self, ObservationError>
pub fn with_iteration_unit( self, unit: impl Into<String>, ) -> Result<Self, ObservationError>
Attaches an optional scientific unit to the inferred iteration axis.
Surrounding whitespace is removed.
§Errors
Returns ObservationError::EmptyAxisUnit when the normalized unit is
empty.
Sourcepub fn with_physical_time_unit(
self,
unit: impl Into<String>,
) -> Result<Self, ObservationError>
pub fn with_physical_time_unit( self, unit: impl Into<String>, ) -> Result<Self, ObservationError>
Attaches an optional scientific unit to the inferred physical_time axis.
Surrounding whitespace is removed.
§Errors
Returns ObservationError::EmptyAxisUnit when the normalized unit is
empty.
Trait Implementations§
Source§impl Clone for ObservationPlan
impl Clone for ObservationPlan
Source§impl Debug for ObservationPlan
impl Debug for ObservationPlan
impl Eq for ObservationPlan
Source§impl PartialEq for ObservationPlan
impl PartialEq for ObservationPlan
impl StructuralPartialEq for ObservationPlan
Auto Trait Implementations§
impl Freeze for ObservationPlan
impl RefUnwindSafe for ObservationPlan
impl Send for ObservationPlan
impl Sync for ObservationPlan
impl Unpin for ObservationPlan
impl UnsafeUnpin for ObservationPlan
impl UnwindSafe for ObservationPlan
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more