Add a bit of documentation
This commit is contained in:
parent
15b8dbe614
commit
b63019bfac
|
@ -6,18 +6,26 @@ use std::io::prelude::*;
|
|||
use std::path::PathBuf;
|
||||
use std::time::SystemTime;
|
||||
|
||||
/// Converts raw string data (in Markdown format) to HTML
|
||||
pub fn data_to_html(data: &String) -> String {
|
||||
comrak::markdown_to_html(data,
|
||||
&comrak::ComrakOptions::default())
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, Serialize, Deserialize)]
|
||||
/// Structure for representing a wish list
|
||||
pub struct List {
|
||||
/// The ID of the list (unique string)
|
||||
pub id: String,
|
||||
/// The index of the list (unique number)
|
||||
pub index: i8,
|
||||
/// The raw list data
|
||||
pub data: String,
|
||||
/// The time the list was last modified
|
||||
pub mtime: SystemTime,
|
||||
/// The name of the list, i.e. the person it is for
|
||||
pub name: String,
|
||||
/// The path to the list file
|
||||
path: PathBuf
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue