header.rs: Add documentation
This commit is contained in:
parent
f921a73fb0
commit
67ae39ab5b
1 changed files with 12 additions and 0 deletions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue