Struct arithmetic_typing::arith::Linearity
source · pub struct Linearity;
Expand description
Constraint
for numeric types that can be subject to unary -
and can participate
in T op Num
/ Num op T
operations.
Defined recursively as linear primitive types and tuples / objects consisting of linear types.
Trait Implementations§
source§impl<Prim: LinearType> Constraint<Prim> for Linearity
impl<Prim: LinearType> Constraint<Prim> for Linearity
source§fn visitor<'r>(
&self,
substitutions: &'r mut Substitutions<Prim>,
errors: OpErrors<'r, Prim>
) -> Box<dyn Visit<Prim> + 'r>
fn visitor<'r>( &self, substitutions: &'r mut Substitutions<Prim>, errors: OpErrors<'r, Prim> ) -> Box<dyn Visit<Prim> + 'r>
source§fn clone_boxed(&self) -> Box<dyn Constraint<Prim>>
fn clone_boxed(&self) -> Box<dyn Constraint<Prim>>
Clones this constraint into a
Box
. Read moresource§impl PartialEq<Linearity> for Linearity
impl PartialEq<Linearity> for Linearity
impl Copy for Linearity
impl Eq for Linearity
impl<Prim: LinearType> ObjectSafeConstraint<Prim> for Linearity
impl StructuralEq for Linearity
impl StructuralPartialEq for Linearity
Auto Trait Implementations§
impl RefUnwindSafe for Linearity
impl Send for Linearity
impl Sync for Linearity
impl Unpin for Linearity
impl UnwindSafe for Linearity
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