Struct grafen::database::DataBase
[−]
[src]
pub struct DataBase { pub path: Option<PathBuf>, pub residue_defs: Vec<Residue>, pub component_defs: Vec<ComponentEntry>, }
A collection of residues and substrate configurations which can be saved to and read from disk.
Fields
path: Option<PathBuf>
A path to the DataBase
location on the hard drive.
residue_defs: Vec<Residue>
Definitions of Residue
objects.
component_defs: Vec<ComponentEntry>
New component constructors.
Methods
impl DataBase
[src]
fn new() -> DataBase
[src]
Construct an empty DataBase
.
fn get_path_pretty(&self) -> String
[src]
Get the database path enclosed in single quotes if it exists, otherwise the unenclosed string "None".
fn set_path<T: ?Sized>(&mut self, new_path: &T) -> Result<(), DataBaseError> where
T: AsRef<OsStr>,
[src]
T: AsRef<OsStr>,
Set a new path for the DataBase
. The input path is asserted to
be a file and the extension is set to 'json'.
Trait Implementations
impl Clone for DataBase
[src]
fn clone(&self) -> DataBase
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more