header.rs: Add documentation

This commit is contained in:
Matthias Beyer 2016-01-21 21:28:18 +01:00
parent f921a73fb0
commit 67ae39ab5b

View file

@ -1,5 +1,11 @@
use toml::Table;
/**
* EntryHeader
*
* This is basically a wrapper around toml::Table which provides convenience to the user of the
* librray.
*/
#[derive(Debug, Clone)]
pub struct EntryHeader {
toml: Table,
@ -7,12 +13,18 @@ pub struct EntryHeader {
impl EntryHeader {
/**
* Get a new header object with a already-filled toml table
*/
pub fn new(toml: Table) -> EntryHeader {
EntryHeader {
toml: toml,
}
}
/**
* Get the table which lives in the background
*/
pub fn toml(&self) -> &Table {
&self.toml
}