pub struct Project<S> {
pub id: Option<Uuid>,
pub file_path: PathBuf,
pub base_location: UtmLocation,
pub datum: Datum,
pub utm_zone: Option<u8>,
pub survey_files: Vec<DatFile<S>>,
/* private fields */
}Fields§
§id: Option<Uuid>§file_path: PathBufThe file path to the project file on disk This is used to resolve relative paths to survey data files
§Note
igoned for equality checks
base_location: UtmLocation§datum: Datum§utm_zone: Option<u8>The UTM zone used for fixed stations in the project
survey_files: Vec<DatFile<S>>Implementations§
Source§impl Project<Unloaded>
impl Project<Unloaded>
Sourcepub fn read(file_path: impl AsRef<Path>) -> Result<Self, Error>
pub fn read(file_path: impl AsRef<Path>) -> Result<Self, Error>
Read a Compass project file from disk
The project file is read from disk and parsed into a ProjectFile struct,
but this does not parse the referenced survey data files
§Returns
ProjectFile representing the contents of the project file
§Errors
Error::ProjectFileNotFoundIf the file does not existError::CouldntReadFileIf the file cannot be read
Sourcepub fn load_survey_files(self) -> Result<Project<Loaded>, Error>
pub fn load_survey_files(self) -> Result<Project<Loaded>, Error>
Read a Compass project’s survey data files from disk The data files are read from the paths specified in the project file
§Returns
Project<Loaded> representing the project file, complete with survey data
§Errors
Error::SurveyFileNotFoundIf a listed survey file does not existError::CouldntReadFileIf the file cannot be readError::CouldntParseSurveyIf the survey file cannot be parsed
Trait Implementations§
Auto Trait Implementations§
impl<S> Freeze for Project<S>
impl<S> RefUnwindSafe for Project<S>where
S: RefUnwindSafe,
impl<S> Send for Project<S>where
S: Send,
impl<S> Sync for Project<S>where
S: Sync,
impl<S> Unpin for Project<S>where
S: Unpin,
impl<S> UnwindSafe for Project<S>where
S: UnwindSafe,
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