[−][src]Struct parse_zoneinfo::table::TableBuilder
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]
&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.
pub fn add_continuation_line(
&mut self,
continuation_line: ZoneInfo
) -> Result<(), Error>
[src]
&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)
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.
pub fn add_link_line<'line>(
&mut self,
link_line: Link<'line>
) -> Result<(), Error<'line>>
[src]
&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.
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]
fn eq(&self, other: &TableBuilder) -> bool
[src]
fn ne(&self, other: &TableBuilder) -> bool
[src]
impl StructuralPartialEq for TableBuilder
[src]
Auto Trait Implementations
impl RefUnwindSafe for TableBuilder
impl Send for TableBuilder
impl Sync for TableBuilder
impl Unpin for TableBuilder
impl UnwindSafe for TableBuilder
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,