[][src]Struct parse_zoneinfo::table::TableBuilder

pub struct TableBuilder { /* fields omitted */ }

A builder for Table values based on various line definitions.

Methods

impl TableBuilder[src]

pub fn new() -> TableBuilder[src]

Creates a new builder with an empty table.

pub fn add_zone_line<'line>(
    &mut self,
    zone_line: Zone<'line>
) -> Result<(), Error<'line>>
[src]

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.

pub fn add_continuation_line(
    &mut self,
    continuation_line: ZoneInfo
) -> Result<(), Error>
[src]

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)

pub fn add_rule_line(&mut self, rule_line: Rule) -> Result<(), Error>[src]

Adds a new line describing one entry in a ruleset, creating that set if it didn’t exist already.

Adds a new line linking one zone to another.

Returns an error if there was already a link with that name.

pub fn build(self) -> Table[src]

Returns the table after it’s finished being built.

Trait Implementations

impl Debug for TableBuilder[src]

impl PartialEq<TableBuilder> for TableBuilder[src]

impl StructuralPartialEq for TableBuilder[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.