Struct hotdrink_rs::macros::RawConstraint [−][src]
An intermediate struct for constructing Constraint
s.
Implementations
impl<T> RawConstraint<T>
[src]
pub fn new<S: Into<String>>(name: S, methods: Vec<RawMethod<T>>) -> Self
[src]
Constructs a new RawConstraint
.
pub fn new_with_assert<S: Into<String>>(
name: S,
methods: Vec<RawMethod<T>>,
assert: Option<Arc<dyn Fn(&[T]) -> bool>>
) -> Self
[src]
name: S,
methods: Vec<RawMethod<T>>,
assert: Option<Arc<dyn Fn(&[T]) -> bool>>
) -> Self
Constructs a new RawConstraint
with an optional assert statement.
pub fn into_constraint(
self,
var_to_idx: &HashMap<String, usize>
) -> Constraint<T> where
T: Clone,
[src]
self,
var_to_idx: &HashMap<String, usize>
) -> Constraint<T> where
T: Clone,
Converts this RawConstraint
into a Constraint
.
Trait Implementations
impl<T> Debug for RawConstraint<T>
[src]
impl<T> PartialEq<RawConstraint<T>> for RawConstraint<T>
[src]
Auto Trait Implementations
impl<T> !RefUnwindSafe for RawConstraint<T>
impl<T> !Send for RawConstraint<T>
impl<T> !Sync for RawConstraint<T>
impl<T> Unpin for RawConstraint<T>
impl<T> !UnwindSafe for RawConstraint<T>
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,
pub 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.
pub 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>,