pub struct Catalog {
pub version: String,
pub catalog_version: CatalogVersion,
pub root_keyword_id: LrId,
/* private fields */
}Expand description
Catalog is the main container for Lightroom. It represents the .lrcat database.
Fields§
§version: StringThe version string
catalog_version: CatalogVersionThe catalog version
root_keyword_id: LrIdId for the root (top level) keyword
Implementations§
Source§impl Catalog
impl Catalog
Sourcepub fn open(&mut self) -> Result<()>
pub fn open(&mut self) -> Result<()>
Open catalog. Return false in failure. This doesn’t check if the content is valid beyond the backing sqlite3.
Sourcepub fn load_version(&mut self)
pub fn load_version(&mut self)
Load version info for the catalog.
Sourcepub fn load_keywords_tree(&mut self) -> KeywordTree
pub fn load_keywords_tree(&mut self) -> KeywordTree
Load a keyword tree
Sourcepub fn load_keywords(&mut self) -> &BTreeMap<LrId, Keyword>
pub fn load_keywords(&mut self) -> &BTreeMap<LrId, Keyword>
Load keywords.
Sourcepub fn keywords(&self) -> &BTreeMap<LrId, Keyword>
pub fn keywords(&self) -> &BTreeMap<LrId, Keyword>
Get the keywords. This assume the keywords have been loaded first.
This allow non-mutable borrowing that would be caused by load_keywords().
Sourcepub fn load_folders(&mut self) -> &Folders
pub fn load_folders(&mut self) -> &Folders
Load folders.
Sourcepub fn folders(&self) -> &Folders
pub fn folders(&self) -> &Folders
Get the folders. This assume the folders have been loaded first.
This allow non-mutable borrowing that would be caused by load_folders().
Sourcepub fn load_library_files(&mut self) -> &Vec<LibraryFile>
pub fn load_library_files(&mut self) -> &Vec<LibraryFile>
Load library files (that back images)
Sourcepub fn libfiles(&self) -> &Vec<LibraryFile>
pub fn libfiles(&self) -> &Vec<LibraryFile>
Get the libfiles. This assume the libfiles have been loaded first.
This allow non-mutable borrowing that would be caused by load_libfiles().
Sourcepub fn load_images(&mut self) -> &Vec<Image>
pub fn load_images(&mut self) -> &Vec<Image>
Load images.
Sourcepub fn images(&self) -> &Vec<Image>
pub fn images(&self) -> &Vec<Image>
Get the images. This assume the images have been loaded first.
This allow non-mutable borrowing that would be caused by load_images().
Sourcepub fn load_collections(&mut self) -> &Vec<Collection>
pub fn load_collections(&mut self) -> &Vec<Collection>
Load collectons.
Sourcepub fn collections(&self) -> &Vec<Collection>
pub fn collections(&self) -> &Vec<Collection>
Get the collections. This assume the collections have been loaded first.
This allow non-mutable borrowing that would be caused by load_collections().