Add booklet source

main
trivernis 4 years ago
parent df38b80bbf
commit efd66388f3

@ -0,0 +1,24 @@
use crate::bibliography::bib_types::LocalDate;
/// A booklet source where only the title can be known
#[derive(Clone, Debug)]
pub struct Booklet {
pub title: String,
pub author: Option<String>,
pub how_published: Option<String>,
pub address: Option<String>,
pub date: Option<LocalDate>,
}
impl Booklet {
/// Creates a new booklet with only the mandatory values
pub fn new(title: String) -> Self {
Self {
title,
author: None,
how_published: None,
address: None,
date: None,
}
}
}

@ -1,9 +1,11 @@
use crate::bibliography::bib_types::article::Article;
use crate::bibliography::bib_types::book::Book;
use chrono::{Date, Local};
use crate::bibliography::bib_types::booklet::Booklet;
pub mod article;
pub mod book;
pub mod booklet;
pub type LocalDate = Date<Local>;
@ -12,7 +14,7 @@ pub type LocalDate = Date<Local>;
pub enum BibliographyType {
Article(Article),
Book(Book),
Booklet,
Booklet(Booklet),
InBook,
InCollection,
Manual,

Loading…
Cancel
Save