pub trait Output:
DynClone
+ Debug
+ Sync {
// Required method
fn write_observations(
&self,
observations: &[LocalObservation],
observatory_name: &str,
time: i128,
output_path_root: &Path,
) -> Result<(), Error>;
// Provided method
fn flush(&self) -> Result<(), Error> { ... }
}Expand description
The trait for structs that output to a file. It may be made more general in future to better accommodate non-file outputs e.g. console loggers, or outputs to screen or streams
Required Methods§
Sourcefn write_observations(
&self,
observations: &[LocalObservation],
observatory_name: &str,
time: i128,
output_path_root: &Path,
) -> Result<(), Error>
fn write_observations( &self, observations: &[LocalObservation], observatory_name: &str, time: i128, output_path_root: &Path, ) -> Result<(), Error>
§Errors
implementations may panic if there is an error in the filesystem e.g. writing is not allowed for a user in a specific directory, or one or more of the directories are files that have already been created