pub struct StoppingDataset { /* private fields */ }Expand description
A validated stopping dataset.
Implementations§
Source§impl StoppingDataset
impl StoppingDataset
Sourcepub fn from_csv_str(text: &str) -> Result<Self, StoppingError>
pub fn from_csv_str(text: &str) -> Result<Self, StoppingError>
Parse and validate a dataset. A byte-order mark, CRLF line endings,
blank lines and # comment lines in the data block are accepted.
Errors name the offending line (StoppingError::InvalidDataset);
a file with no column header or no points is
StoppingError::InvalidTable.
Sourcepub fn from_csv_file(path: impl AsRef<Path>) -> Result<Self, StoppingError>
pub fn from_csv_file(path: impl AsRef<Path>) -> Result<Self, StoppingError>
Load from a file.
Sourcepub fn description(&self) -> Option<&str>
pub fn description(&self) -> Option<&str>
The description header value, if given and non-empty.
Sourcepub fn points(&self) -> &[StoppingPoint]
pub fn points(&self) -> &[StoppingPoint]
The points, in file order.
Trait Implementations§
Source§impl Clone for StoppingDataset
impl Clone for StoppingDataset
Source§fn clone(&self) -> StoppingDataset
fn clone(&self) -> StoppingDataset
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 StoppingDataset
impl Debug for StoppingDataset
Source§impl PartialEq for StoppingDataset
impl PartialEq for StoppingDataset
impl StructuralPartialEq for StoppingDataset
Auto Trait Implementations§
impl Freeze for StoppingDataset
impl RefUnwindSafe for StoppingDataset
impl Send for StoppingDataset
impl Sync for StoppingDataset
impl Unpin for StoppingDataset
impl UnsafeUnpin for StoppingDataset
impl UnwindSafe for StoppingDataset
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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> ⓘ
Converts
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> ⓘ
Converts
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