[][src]Struct phreak_facts::FactsBuilder

pub struct FactsBuilder { /* fields omitted */ }

To facilitate the creation of facts, we offer a builder pattern.

Methods

impl FactsBuilder[src]

pub fn new(name: String) -> Self[src]

Start building a new Facts object with the given class name

pub fn add_attributes(
    self,
    field1: String,
    field2: String,
    field3: String
) -> Self
[src]

Add one triple of information

Triples can be of the format ( instance-id, attribute, value )

pub fn add_attributes_from_slice(
    self,
    field1: &str,
    field2: &str,
    field3: &str
) -> Self
[src]

Add one triple of information

Triples can be of the format ( instance-id, attribute, value )

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

Finalize the facts object and return it

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.