pub struct StockFile {
pub path: PathBuf,
/* private fields */
}Expand description
What a stock file said, and where it said it.
Fields§
§path: PathBufThe path it was read from, for messages.
Implementations§
Source§impl StockFile
impl StockFile
Sourcepub fn read(path: impl AsRef<Path>) -> Result<Self, StockError>
pub fn read(path: impl AsRef<Path>) -> Result<Self, StockError>
Read and parse a stock file.
§Errors
Fails on a read error, a syntax error, or a missing required field.
Sourcepub fn is_reversal(&self) -> bool
pub fn is_reversal(&self) -> bool
Whether this is a reversal film, whose curve falls with exposure.
§Errors
Cannot fail: an absent stock.process is a negative.
Sourcepub fn claims_measured(&self) -> bool
pub fn claims_measured(&self) -> bool
Whether the file claims the numbers were measured.
Trait Implementations§
Auto Trait Implementations§
impl Forget for StockFile
impl Freeze for StockFile
impl Move for StockFile
impl RefUnwindSafe for StockFile
impl Send for StockFile
impl Sync for StockFile
impl Unpin for StockFile
impl UnsafeUnpin for StockFile
impl UnwindSafe for StockFile
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