pub enum GridSpec {
Values(Arc<[f64]>),
Linspace {
start: f64,
end: f64,
points: usize,
},
}Expand description
Points at which a continuous response is evaluated.
Variants§
Values(Arc<[f64]>)
Explicit, strictly increasing finite values.
Linspace
Inclusive evenly spaced grid.
Implementations§
Source§impl GridSpec
impl GridSpec
Sourcepub fn values(&self) -> Result<Vec<f64>, QueryError>
pub fn values(&self) -> Result<Vec<f64>, QueryError>
Materialize the grid after validation.
§Errors
QueryError::InvalidResponse when the grid is invalid or too large to materialize.
Sourcepub fn validate(&self) -> Result<(), QueryError>
pub fn validate(&self) -> Result<(), QueryError>
Validate finiteness, size, and ordering.
§Errors
QueryError::InvalidResponse when values are non-finite, unordered, or undersized.
Trait Implementations§
impl StructuralPartialEq for GridSpec
Auto Trait Implementations§
impl Freeze for GridSpec
impl RefUnwindSafe for GridSpec
impl Send for GridSpec
impl Sync for GridSpec
impl Unpin for GridSpec
impl UnsafeUnpin for GridSpec
impl UnwindSafe for GridSpec
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