Struct hotdrink_rs::macros::RawComponent [−][src]
pub struct RawComponent<T> { /* fields omitted */ }
An intermediate struct for constructing Component
s.
Implementations
impl<T> RawComponent<T>
[src]
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]
name: S,
variables: Vec<S>,
values: Vec<T>,
constraints: Vec<RawConstraint<T>>
) -> Self
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]
T: Clone,
Converts this RawComponent
into a Component
.
Trait Implementations
impl<T: PartialEq> PartialEq<RawComponent<T>> for RawComponent<T>
[src]
impl<T: PartialEq> PartialEq<RawComponent<T>> for RawComponent<T>
[src]fn eq(&self, other: &RawComponent<T>) -> bool
[src]
fn ne(&self, other: &RawComponent<T>) -> bool
[src]
impl<T> StructuralPartialEq for RawComponent<T>
[src]
impl<T> StructuralPartialEq for RawComponent<T>
[src]Auto Trait Implementations
impl<T> !RefUnwindSafe for RawComponent<T>
impl<T> !RefUnwindSafe for RawComponent<T>
impl<T> !Send for RawComponent<T>
impl<T> !Send for RawComponent<T>
impl<T> !Sync for RawComponent<T>
impl<T> !Sync for RawComponent<T>
impl<T> Unpin for RawComponent<T> where
T: Unpin,
impl<T> Unpin for RawComponent<T> where
T: Unpin,
impl<T> !UnwindSafe for RawComponent<T>
impl<T> !UnwindSafe for RawComponent<T>