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