Struct mech_core::I32

source ·
pub struct I32(/* private fields */);

Implementations§

source§

impl I32

source

pub fn new(inner: i32) -> I32

source

pub fn kind(&self) -> ValueKind

source

pub fn unwrap(&self) -> i32

Trait Implementations§

source§

impl Add for I32

§

type Output = I32

The resulting type after applying the + operator.
source§

fn add(self, rhs: I32) -> I32

Performs the + operation. Read more
source§

impl AddAssign for I32

source§

fn add_assign(&mut self, other: Self)

Performs the += operation. Read more
source§

impl Clone for I32

source§

fn clone(&self) -> I32

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for I32

source§

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

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

impl<'de> Deserialize<'de> for I32

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl Div for I32

§

type Output = I32

The resulting type after applying the / operator.
source§

fn div(self, rhs: I32) -> I32

Performs the / operation. Read more
source§

impl DivAssign for I32

source§

fn div_assign(&mut self, other: Self)

Performs the /= operation. Read more
source§

impl From<F32> for I32

source§

fn from(n: F32) -> I32

Converts to this type from the input type.
source§

impl From<F64> for I32

source§

fn from(n: F64) -> I32

Converts to this type from the input type.
source§

impl From<I16> for I32

source§

fn from(n: I16) -> I32

Converts to this type from the input type.
source§

impl From<I32> for F32

source§

fn from(n: I32) -> F32

Converts to this type from the input type.
source§

impl From<I32> for F64

source§

fn from(n: I32) -> F64

Converts to this type from the input type.
source§

impl From<I32> for I128

source§

fn from(n: I32) -> I128

Converts to this type from the input type.
source§

impl From<I32> for I64

source§

fn from(n: I32) -> I64

Converts to this type from the input type.
source§

impl From<I32> for Value

source§

fn from(n: I32) -> Value

Converts to this type from the input type.
source§

impl From<I32> for i32

source§

fn from(n: I32) -> i32

Converts to this type from the input type.
source§

impl From<I8> for I32

source§

fn from(n: I8) -> I32

Converts to this type from the input type.
source§

impl Mul for I32

§

type Output = I32

The resulting type after applying the * operator.
source§

fn mul(self, rhs: I32) -> I32

Performs the * operation. Read more
source§

impl MulAssign for I32

source§

fn mul_assign(&mut self, other: Self)

Performs the *= operation. Read more
source§

impl Neg for I32

§

type Output = I32

The resulting type after applying the - operator.
source§

fn neg(self) -> I32

Performs the unary - operation. Read more
source§

impl PartialEq for I32

source§

fn eq(&self, other: &I32) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl PartialOrd for I32

source§

fn partial_cmp(&self, other: &I32) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
source§

impl<'a, 'b> Pow<&'a U16> for &'b I32

§

type Output = I32

The result after applying the operator.
source§

fn pow(self, rhs: &'a U16) -> I32

Returns self to the power rhs. Read more
source§

impl<'a> Pow<&'a U16> for I32

§

type Output = I32

The result after applying the operator.
source§

fn pow(self, rhs: &'a U16) -> I32

Returns self to the power rhs. Read more
source§

impl<'a, 'b> Pow<&'a U32> for &'b I32

§

type Output = I32

The result after applying the operator.
source§

fn pow(self, rhs: &'a U32) -> I32

Returns self to the power rhs. Read more
source§

impl<'a> Pow<&'a U32> for I32

§

type Output = I32

The result after applying the operator.
source§

fn pow(self, rhs: &'a U32) -> I32

Returns self to the power rhs. Read more
source§

impl<'a, 'b> Pow<&'a U8> for &'b I32

§

type Output = I32

The result after applying the operator.
source§

fn pow(self, rhs: &'a U8) -> I32

Returns self to the power rhs. Read more
source§

impl<'a> Pow<&'a U8> for I32

§

type Output = I32

The result after applying the operator.
source§

fn pow(self, rhs: &'a U8) -> I32

Returns self to the power rhs. Read more
source§

impl<T: Into<I32>> Pow<T> for I32

§

type Output = I32

The result after applying the operator.
source§

fn pow(self, rhs: T) -> I32

Returns self to the power rhs. Read more
source§

impl<'a> Pow<U16> for &'a I32

§

type Output = I32

The result after applying the operator.
source§

fn pow(self, rhs: U16) -> I32

Returns self to the power rhs. Read more
source§

impl Pow<U16> for I32

§

type Output = I32

The result after applying the operator.
source§

fn pow(self, rhs: U16) -> I32

Returns self to the power rhs. Read more
source§

impl<'a> Pow<U32> for &'a I32

§

type Output = I32

The result after applying the operator.
source§

fn pow(self, rhs: U32) -> I32

Returns self to the power rhs. Read more
source§

impl Pow<U32> for I32

§

type Output = I32

The result after applying the operator.
source§

fn pow(self, rhs: U32) -> I32

Returns self to the power rhs. Read more
source§

impl<'a> Pow<U8> for &'a I32

§

type Output = I32

The result after applying the operator.
source§

fn pow(self, rhs: U8) -> I32

Returns self to the power rhs. Read more
source§

impl Pow<U8> for I32

§

type Output = I32

The result after applying the operator.
source§

fn pow(self, rhs: U8) -> I32

Returns self to the power rhs. Read more
source§

impl Serialize for I32

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Sub for I32

§

type Output = I32

The resulting type after applying the - operator.
source§

fn sub(self, rhs: I32) -> I32

Performs the - operation. Read more
source§

impl SubAssign for I32

source§

fn sub_assign(&mut self, other: Self)

Performs the -= operation. Read more
source§

impl Zero for I32

source§

fn zero() -> Self

Returns the additive identity element of Self, 0. Read more
source§

fn is_zero(&self) -> bool

Returns true if self is equal to the additive identity.
source§

fn set_zero(&mut self)

Sets self to the additive identity element of Self, 0.
source§

impl Copy for I32

source§

impl MechNumArithmetic<I32> for I32

source§

impl StructuralPartialEq for I32

Auto Trait Implementations§

§

impl Freeze for I32

§

impl RefUnwindSafe for I32

§

impl Send for I32

§

impl Sync for I32

§

impl Unpin for I32

§

impl UnwindSafe for I32

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> CloneToUninit for T
where T: Copy,

source§

unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
source§

impl<T> CloneToUninit for T
where T: Clone,

source§

default unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. 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> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<SS, SP> SupersetOf<SS> for SP
where SS: SubsetOf<SP>,

source§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more
source§

fn is_in_subset(&self) -> bool

Checks if self is actually part of its subset T (and can be converted to it).
source§

fn to_subset_unchecked(&self) -> SS

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
source§

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. 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.
source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

source§

fn vzip(self) -> V

source§

impl<T, Right> ClosedAdd<Right> for T
where T: Add<Right, Output = T> + AddAssign<Right>,

source§

impl<T, Right> ClosedAddAssign<Right> for T
where T: ClosedAdd<Right> + AddAssign<Right>,

source§

impl<T, Right> ClosedDiv<Right> for T
where T: Div<Right, Output = T> + DivAssign<Right>,

source§

impl<T, Right> ClosedDivAssign<Right> for T
where T: ClosedDiv<Right> + DivAssign<Right>,

source§

impl<T, Right> ClosedMul<Right> for T
where T: Mul<Right, Output = T> + MulAssign<Right>,

source§

impl<T, Right> ClosedMulAssign<Right> for T
where T: ClosedMul<Right> + MulAssign<Right>,

source§

impl<T> ClosedNeg for T
where T: Neg<Output = T>,

source§

impl<T, Right> ClosedSub<Right> for T
where T: Sub<Right, Output = T> + SubAssign<Right>,

source§

impl<T, Right> ClosedSubAssign<Right> for T
where T: ClosedSub<Right> + SubAssign<Right>,

source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

source§

impl<T> Scalar for T
where T: 'static + Clone + PartialEq + Debug,