Struct parse_zoneinfo::table::TableBuilder
[−]
[src]
pub struct TableBuilder { /* fields omitted */ }
A builder for Table
values based on various line definitions.
Methods
impl TableBuilder
[src]
fn new() -> TableBuilder
Creates a new builder with an empty table.
fn add_zone_line<'line>(
&mut self,
zone_line: Zone<'line>
) -> Result<(), Error<'line>>
&mut self,
zone_line: Zone<'line>
) -> Result<(), Error<'line>>
Adds a new line describing a zone definition.
Returns an error if there’s already a zone with the same name, or the zone refers to a ruleset that hasn’t been defined yet.
fn add_continuation_line(
&mut self,
continuation_line: ZoneInfo
) -> Result<(), Error>
&mut self,
continuation_line: ZoneInfo
) -> Result<(), Error>
Adds a new line describing the continuation of a zone definition.
Returns an error if the builder wasn’t expecting a continuation line (meaning, the previous line wasn’t a zone line)
fn add_rule_line(&mut self, rule_line: Rule) -> Result<(), Error>
Adds a new line describing one entry in a ruleset, creating that set if it didn’t exist already.
fn add_link_line<'line>(
&mut self,
link_line: Link<'line>
) -> Result<(), Error<'line>>
&mut self,
link_line: Link<'line>
) -> Result<(), Error<'line>>
Adds a new line linking one zone to another.
Returns an error if there was already a link with that name.
fn build(self) -> Table
Returns the table after it’s finished being built.
Trait Implementations
impl PartialEq for TableBuilder
[src]
fn eq(&self, __arg_0: &TableBuilder) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &TableBuilder) -> bool
This method tests for !=
.