Struct arithmetic_typing::FnWithConstraints
source · pub struct FnWithConstraints<Prim: PrimitiveType> { /* private fields */ }
Expand description
Function together with constraints on type variables contained either in the function itself or any of the child functions.
Constructed via Function::with_constraints()
.
Implementations§
source§impl<Prim: PrimitiveType> FnWithConstraints<Prim>
impl<Prim: PrimitiveType> FnWithConstraints<Prim>
sourcepub fn with_constraint<C>(self, indexes: &[usize], constraint: &C) -> Selfwhere
C: Constraint<Prim> + Clone,
pub fn with_constraint<C>(self, indexes: &[usize], constraint: &C) -> Selfwhere
C: Constraint<Prim> + Clone,
Marks type params with the specified indexes
to have constraints
. If some constraints
are already present for some of the types, they are overwritten.
sourcepub fn with_static_lengths(self, indexes: &[usize]) -> Self
pub fn with_static_lengths(self, indexes: &[usize]) -> Self
Marks lengths with the specified indexes
as static.
Trait Implementations§
source§impl<Prim: Debug + PrimitiveType> Debug for FnWithConstraints<Prim>
impl<Prim: Debug + PrimitiveType> Debug for FnWithConstraints<Prim>
source§impl<Prim: PrimitiveType> Display for FnWithConstraints<Prim>
impl<Prim: PrimitiveType> Display for FnWithConstraints<Prim>
source§impl<Prim: PrimitiveType> From<FnWithConstraints<Prim>> for Function<Prim>
impl<Prim: PrimitiveType> From<FnWithConstraints<Prim>> for Function<Prim>
source§fn from(value: FnWithConstraints<Prim>) -> Self
fn from(value: FnWithConstraints<Prim>) -> Self
Converts to this type from the input type.
source§impl<Prim: PrimitiveType> From<FnWithConstraints<Prim>> for Type<Prim>
impl<Prim: PrimitiveType> From<FnWithConstraints<Prim>> for Type<Prim>
source§fn from(value: FnWithConstraints<Prim>) -> Self
fn from(value: FnWithConstraints<Prim>) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl<Prim> Freeze for FnWithConstraints<Prim>where
Prim: Freeze,
impl<Prim> !RefUnwindSafe for FnWithConstraints<Prim>
impl<Prim> Send for FnWithConstraints<Prim>
impl<Prim> Sync for FnWithConstraints<Prim>
impl<Prim> Unpin for FnWithConstraints<Prim>where
Prim: Unpin,
impl<Prim> !UnwindSafe for FnWithConstraints<Prim>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more