Struct hotdrink_rs::builders::component_builder::ComponentBuilder[][src]

pub struct ComponentBuilder<T> { /* fields omitted */ }

A builder for making programmatic construction of components easier.

Implementations

impl<T> ComponentBuilder<T>[src]

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

Constructs a new ComponentBuilder with no variables or constraints.

pub fn variable<S: Into<String>>(self, name: S, value: T) -> Self[src]

Adds an immutable variable.

pub fn variable_mut<S: Into<String>>(self, name: S, value: T) -> Self[src]

Adds a mutable variable.

pub fn variables<S: Into<String>>(self, variables: Vec<(S, T)>) -> Self[src]

Adds immutable variables.

pub fn variables_mut<S: Into<String>>(self, variables: Vec<(S, T)>) -> Self[src]

Adds mutable variables.

pub fn constraint(self, constraint: ConstraintBuilder<T>) -> Self[src]

Adds a constraint.

Trait Implementations

impl<T: Clone> Clone for ComponentBuilder<T>[src]

impl<T: Debug> Debug for ComponentBuilder<T>[src]

Auto Trait Implementations

impl<T> !RefUnwindSafe for ComponentBuilder<T>

impl<T> !Send for ComponentBuilder<T>

impl<T> !Sync for ComponentBuilder<T>

impl<T> Unpin for ComponentBuilder<T>

impl<T> !UnwindSafe for ComponentBuilder<T>

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> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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.