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 for Linearity
impl PartialEq for Linearity
impl 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: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)§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
Checks if this value is equivalent to the given key. Read more