Struct hotdrink_rs::macros::RawComponent[][src]

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

An intermediate struct for constructing Components.

Implementations

impl<T> RawComponent<T>[src]

pub fn new<S: Into<String>>(
    name: S,
    variables: Vec<S>,
    values: Vec<T>,
    constraints: Vec<RawConstraint<T>>
) -> Self
[src]

Constructs a new RawComponent.

pub fn indices(&self) -> HashMap<String, usize>[src]

Get a map from variable name to its index

pub fn add_constraint(&mut self, c: RawConstraint<T>)[src]

Add a new constraint to the component.

pub fn into_component(self) -> Component<T> where
    T: Clone
[src]

Converts this RawComponent into a Component.

Trait Implementations

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

impl<T: PartialEq> PartialEq<RawComponent<T>> for RawComponent<T>[src]

impl<T> StructuralPartialEq for RawComponent<T>[src]

Auto Trait Implementations

impl<T> !RefUnwindSafe for RawComponent<T>

impl<T> !Send for RawComponent<T>

impl<T> !Sync for RawComponent<T>

impl<T> Unpin for RawComponent<T> where
    T: Unpin

impl<T> !UnwindSafe for RawComponent<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, 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.