pub struct DataWriter {
assets_writer: Writer<File>,
flows_writer: Writer<File>,
prices_writer: Writer<File>,
}
Expand description
An object for writing commodity prices to file
Fields§
§assets_writer: Writer<File>
§flows_writer: Writer<File>
§prices_writer: Writer<File>
Implementations§
Source§impl DataWriter
impl DataWriter
Sourcepub fn create(output_path: &Path) -> Result<Self>
pub fn create(output_path: &Path) -> Result<Self>
Create a new CSV files to write output data to
Sourcepub fn write_assets<'a, I>(
&mut self,
milestone_year: u32,
assets: I,
) -> Result<()>
pub fn write_assets<'a, I>( &mut self, milestone_year: u32, assets: I, ) -> Result<()>
Write assets to a CSV file
Sourcepub fn write_flows<'a, I>(
&mut self,
milestone_year: u32,
assets: &AssetPool,
flows: I,
) -> Result<()>
pub fn write_flows<'a, I>( &mut self, milestone_year: u32, assets: &AssetPool, flows: I, ) -> Result<()>
Write commodity flows to a CSV file
Sourcepub fn write_prices(
&mut self,
milestone_year: u32,
prices: &CommodityPrices,
) -> Result<()>
pub fn write_prices( &mut self, milestone_year: u32, prices: &CommodityPrices, ) -> Result<()>
Write commodity prices to a CSV file
Auto Trait Implementations§
impl Freeze for DataWriter
impl RefUnwindSafe for DataWriter
impl Send for DataWriter
impl Sync for DataWriter
impl Unpin for DataWriter
impl UnwindSafe for DataWriter
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
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