Add InCollection source
parent
7b1bc9b3d3
commit
7cac672ef3
@ -0,0 +1,36 @@
|
|||||||
|
use crate::bibliography::bib_types::LocalDate;
|
||||||
|
|
||||||
|
/// A source that is in a collection
|
||||||
|
#[derive(Clone, Debug)]
|
||||||
|
pub struct InCollection {
|
||||||
|
author: String,
|
||||||
|
title: String,
|
||||||
|
publisher: String,
|
||||||
|
date: LocalDate,
|
||||||
|
editor: Option<String>,
|
||||||
|
volume: Option<String>,
|
||||||
|
series: Option<String>,
|
||||||
|
chapter: Option<String>,
|
||||||
|
pages: Option<String>,
|
||||||
|
address: Option<String>,
|
||||||
|
edition: Option<String>,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl InCollection {
|
||||||
|
/// Creates a new InCollection source with only the mandatory fields filled
|
||||||
|
pub fn new(author: String, title: String, publisher: String, date: LocalDate) -> Self {
|
||||||
|
Self {
|
||||||
|
author,
|
||||||
|
title,
|
||||||
|
publisher,
|
||||||
|
date,
|
||||||
|
editor: None,
|
||||||
|
volume: None,
|
||||||
|
series: None,
|
||||||
|
chapter: None,
|
||||||
|
pages: None,
|
||||||
|
address: None,
|
||||||
|
edition: None,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -1,3 +1,3 @@
|
|||||||
pub mod bibliography_entry;
|
pub mod bib_types;
|
||||||
pub mod bibliography_dict;
|
pub mod bibliography_dict;
|
||||||
pub mod bib_types;
|
pub mod bibliography_entry;
|
||||||
|
@ -1,2 +1,2 @@
|
|||||||
|
pub mod anchor;
|
||||||
pub mod bib_reference;
|
pub mod bib_reference;
|
||||||
pub mod anchor;
|
|
Loading…
Reference in New Issue