Skip to main content

paperless_api/
metadata.rs

1//! Metadata associated with documents.
2
3use derive_more::Display;
4use serde_repr::{Deserialize_repr, Serialize_repr};
5
6pub mod correspondent;
7pub mod custom_field;
8pub mod document_type;
9pub mod permission;
10pub mod storage_path;
11pub mod tag;
12
13pub use correspondent::Correspondent;
14pub use custom_field::CustomField;
15pub use document_type::DocumentType;
16pub use permission::Permission;
17pub use storage_path::StoragePath;
18pub use tag::Tag;
19
20/// A matching algorithm for metadata items.
21#[derive(Debug, Default, Clone, Copy, Display, Deserialize_repr, Serialize_repr)]
22#[repr(u8)]
23pub enum MatchAlgorithm {
24    None = 0,
25    AnyWord = 1,
26    AllWords = 2,
27    ExactMatch = 3,
28    Regex = 4,
29    Fuzzy = 5,
30
31    #[default]
32    Automatic = 6,
33}