Skip to main content

ChainBuilder

Struct ChainBuilder 

Source
pub struct ChainBuilder<S: 'static, O, W, Sc>
where O: Operator<S>,
{ /* private fields */ }
Expand description

Finalizer for a chain: holds the tree, impact, and row weight until named() attaches a constraint name.

Implementations§

Source§

impl<S, O, W, Sc> ChainBuilder<S, O, W, Sc>
where S: Send + Sync + 'static, O: Operator<S> + Send + Sync, W: for<'a> Fn(&S, &O::View<'a>) -> Sc + Send + Sync, Sc: Score + 'static, for<'a> O::View<'a>: ExplainRow,

Source

pub fn hard(self) -> Self

Marks the constraint hard.

Source

pub fn named(self, name: &str) -> OperatorTerminal<S, O, W, Sc>

Names the constraint, producing the terminal.

Auto Trait Implementations§

§

impl<S, O, W, Sc> Freeze for ChainBuilder<S, O, W, Sc>
where O: Freeze, W: Freeze, PhantomData<fn() -> (S, Sc)>: Freeze,

§

impl<S, O, W, Sc> RefUnwindSafe for ChainBuilder<S, O, W, Sc>

§

impl<S, O, W, Sc> Send for ChainBuilder<S, O, W, Sc>
where O: Send, W: Send, PhantomData<fn() -> (S, Sc)>: Send,

§

impl<S, O, W, Sc> Sync for ChainBuilder<S, O, W, Sc>
where O: Sync, W: Sync, PhantomData<fn() -> (S, Sc)>: Sync,

§

impl<S, O, W, Sc> Unpin for ChainBuilder<S, O, W, Sc>
where O: Unpin, W: Unpin, PhantomData<fn() -> (S, Sc)>: Unpin,

§

impl<S, O, W, Sc> UnsafeUnpin for ChainBuilder<S, O, W, Sc>

§

impl<S, O, W, Sc> UnwindSafe for ChainBuilder<S, O, W, Sc>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.