episko_lib/lib.rs
1#![warn(clippy::pedantic)]
2//! # Episko Library
3//!
4//! This library is part of the projekt [Episko](https://github.com/SoftwareEngineeringOne/episko).
5//! It provides functionality and interfaces to create and manage
6//! metadata for projects.
7//!
8//! ## Structure
9//! The library is structured into the following modules:
10//! - metadata
11//! - files
12//! - database
13//!
14//! The metadata module is part of the core crate, while the files module
15//! is placed under the "files" feature flag, which is however enabled by
16//! default.
17//!
18//! Disabling default features may lead to errors, as currently macros
19//! are used in the core crate that don't work without some of the
20//! features.
21//! This needs to be adressed at a later point in the project.
22//!
23//! Detailed documentation can be found within each module.
24
25pub mod config;
26#[cfg(feature = "database")]
27pub mod database;
28#[cfg(feature = "files")]
29pub mod files;
30pub mod metadata;
31pub mod statistics;
32
33/// Trait to perform a self consuming action based on a condition.
34pub trait ApplyIf: Sized {
35 #[must_use]
36 fn apply_if<T>(self, value: Option<T>, f: fn(Self, T) -> Self) -> Self;
37}
38
39/// Placeholder used as a command by tauri
40#[must_use]
41pub fn greet(name: &str) -> String {
42 format!("Hello, {name}!")
43}