1extern crate chrono;
8extern crate peg;
9extern crate rusqlite;
10
11mod catalog;
12mod collections;
13mod content;
14mod folders;
15mod fromdb;
16mod images;
17mod keywords;
18mod keywordtree;
19mod libraryfiles;
20mod lrobject;
21pub mod lron;
22
23#[derive(Debug, PartialEq)]
25pub struct Point {
26 pub x: f64,
27 pub y: f64,
28}
29
30#[derive(Debug, PartialEq)]
32pub struct AspectRatio {
33 pub width: i32,
34 pub height: i32,
35}
36
37#[derive(Debug, PartialEq)]
40pub struct Rect {
41 pub top: f64,
42 pub bottom: f64,
43 pub left: f64,
44 pub right: f64,
45}
46
47#[derive(Debug, thiserror::Error)]
49pub enum Error {
50 #[error("Unimplemented")]
51 Unimplemented,
53 #[error("LrCat: Skip.")]
54 Skip,
56 #[error("LrCat: Unsupported catalog version.")]
57 UnsupportedVersion,
59 #[error("LrCat: SQL error: {0}")]
60 Sql(#[from] rusqlite::Error),
62 #[error("LrCat: Lron parsing error: {0}")]
63 Lron(#[from] peg::error::ParseError<peg::str::LineCol>),
65}
66
67pub type Result<T> = std::result::Result<T, Error>;
69
70pub use catalog::{Catalog, CatalogVersion};
71pub use collections::Collection;
72pub use content::Content;
73pub use folders::{Folder, Folders, RootFolder};
74pub use images::Image;
75pub use keywords::Keyword;
76pub use keywordtree::KeywordTree;
77pub use libraryfiles::LibraryFile;
78pub use lrobject::{LrId, LrObject};