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>

source

pub fn with_constraint<C>(self, indexes: &[usize], constraint: &C) -> Self
where 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.

source

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>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<Prim: PrimitiveType> Display for FnWithConstraints<Prim>

source§

fn fmt(&self, formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<Prim: PrimitiveType> From<FnWithConstraints<Prim>> for Function<Prim>

source§

fn from(value: FnWithConstraints<Prim>) -> Self

Converts to this type from the input type.
source§

impl<Prim: PrimitiveType> From<FnWithConstraints<Prim>> for Type<Prim>

source§

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> 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> ToString for T
where T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

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

§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

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

§

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.