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 moreimpl Copy for Linearity
impl Eq for Linearity
impl<Prim: LinearType> ObjectSafeConstraint<Prim> for Linearity
impl StructuralPartialEq for Linearity
Auto Trait Implementations§
impl Freeze for Linearity
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.