PostfixExpr

Struct PostfixExpr 

Source
pub struct PostfixExpr<T, Ops, const D: usize = 2> {
    pub nodes: Vec<PNode>,
    pub consts: Vec<T>,
    pub meta: Metadata,
    /* private fields */
}

Fields§

§nodes: Vec<PNode>§consts: Vec<T>§meta: Metadata

Implementations§

Source§

impl<T, Ops, const D: usize> PostfixExpr<T, Ops, D>

Source

pub fn new(nodes: Vec<PNode>, consts: Vec<T>, meta: Metadata) -> Self

Source

pub fn zero() -> Self
where T: Zero,

Construct a zero-valued constant expression.

Source

pub fn hash_nodes(&self) -> u64

Trait Implementations§

Source§

impl<T, Ops, const D: usize> Add<PostfixExpr<T, Ops, D>> for Lit<T>
where Ops: HasOp<Add>,

Source§

type Output = PostfixExpr<T, Ops, D>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: PostfixExpr<T, Ops, D>) -> Self::Output

Performs the + operation. Read more
Source§

impl<T, Ops, const D: usize> Add<T> for PostfixExpr<T, Ops, D>
where Ops: HasOp<Add>,

Source§

type Output = PostfixExpr<T, Ops, D>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: T) -> Self::Output

Performs the + operation. Read more
Source§

impl<T, Ops, const D: usize> Add for PostfixExpr<T, Ops, D>
where Ops: HasOp<Add>,

Source§

type Output = PostfixExpr<T, Ops, D>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: Self) -> Self::Output

Performs the + operation. Read more
Source§

impl<T: Clone, Ops, const D: usize> Clone for PostfixExpr<T, Ops, D>

Source§

fn clone(&self) -> Self

Returns a duplicate 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<T: Debug, Ops: Debug, const D: usize> Debug for PostfixExpr<T, Ops, D>

Source§

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

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

impl<T, Ops, const D: usize> Display for PostfixExpr<T, Ops, D>
where T: Display, Ops: OperatorSet,

Source§

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

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

impl<T, Ops, const D: usize> Div<PostfixExpr<T, Ops, D>> for Lit<T>
where Ops: HasOp<Div>,

Source§

type Output = PostfixExpr<T, Ops, D>

The resulting type after applying the / operator.
Source§

fn div(self, rhs: PostfixExpr<T, Ops, D>) -> Self::Output

Performs the / operation. Read more
Source§

impl<T, Ops, const D: usize> Div<T> for PostfixExpr<T, Ops, D>
where Ops: HasOp<Div>,

Source§

type Output = PostfixExpr<T, Ops, D>

The resulting type after applying the / operator.
Source§

fn div(self, rhs: T) -> Self::Output

Performs the / operation. Read more
Source§

impl<T, Ops, const D: usize> Div for PostfixExpr<T, Ops, D>
where Ops: HasOp<Div>,

Source§

type Output = PostfixExpr<T, Ops, D>

The resulting type after applying the / operator.
Source§

fn div(self, rhs: Self) -> Self::Output

Performs the / operation. Read more
Source§

impl<T, Ops, const D: usize> Mul<PostfixExpr<T, Ops, D>> for Lit<T>
where Ops: HasOp<Mul>,

Source§

type Output = PostfixExpr<T, Ops, D>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: PostfixExpr<T, Ops, D>) -> Self::Output

Performs the * operation. Read more
Source§

impl<T, Ops, const D: usize> Mul<T> for PostfixExpr<T, Ops, D>
where Ops: HasOp<Mul>,

Source§

type Output = PostfixExpr<T, Ops, D>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: T) -> Self::Output

Performs the * operation. Read more
Source§

impl<T, Ops, const D: usize> Mul for PostfixExpr<T, Ops, D>
where Ops: HasOp<Mul>,

Source§

type Output = PostfixExpr<T, Ops, D>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: Self) -> Self::Output

Performs the * operation. Read more
Source§

impl<T, Ops, const D: usize> Neg for PostfixExpr<T, Ops, D>
where Ops: HasOp<Neg>,

Source§

type Output = PostfixExpr<T, Ops, D>

The resulting type after applying the - operator.
Source§

fn neg(self) -> Self::Output

Performs the unary - operation. Read more
Source§

impl<T, Ops, const D: usize> PostfixExpression<D> for PostfixExpr<T, Ops, D>

Source§

type Scalar = T

Source§

type Ops = Ops

Source§

fn nodes(&self) -> &[PNode]

Source§

fn consts(&self) -> &[Self::Scalar]

Source§

fn meta(&self) -> &Metadata

Source§

impl<T, Ops, const D: usize> PostfixExpressionMut<D> for PostfixExpr<T, Ops, D>

Source§

fn nodes_mut(&mut self) -> &mut [PNode]

Source§

fn consts_mut(&mut self) -> &mut [Self::Scalar]

Source§

fn meta_mut(&mut self) -> &mut Metadata

Source§

impl<T, Ops, const D: usize> Sub<PostfixExpr<T, Ops, D>> for Lit<T>
where Ops: HasOp<Sub>,

Source§

type Output = PostfixExpr<T, Ops, D>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: PostfixExpr<T, Ops, D>) -> Self::Output

Performs the - operation. Read more
Source§

impl<T, Ops, const D: usize> Sub<T> for PostfixExpr<T, Ops, D>
where Ops: HasOp<Sub>,

Source§

type Output = PostfixExpr<T, Ops, D>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: T) -> Self::Output

Performs the - operation. Read more
Source§

impl<T, Ops, const D: usize> Sub for PostfixExpr<T, Ops, D>
where Ops: HasOp<Sub>,

Source§

type Output = PostfixExpr<T, Ops, D>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: Self) -> Self::Output

Performs the - operation. Read more

Auto Trait Implementations§

§

impl<T, Ops, const D: usize> Freeze for PostfixExpr<T, Ops, D>

§

impl<T, Ops, const D: usize> RefUnwindSafe for PostfixExpr<T, Ops, D>

§

impl<T, Ops, const D: usize> Send for PostfixExpr<T, Ops, D>
where Ops: Send, T: Send,

§

impl<T, Ops, const D: usize> Sync for PostfixExpr<T, Ops, D>
where Ops: Sync, T: Sync,

§

impl<T, Ops, const D: usize> Unpin for PostfixExpr<T, Ops, D>
where Ops: Unpin, T: Unpin,

§

impl<T, Ops, const D: usize> UnwindSafe for PostfixExpr<T, Ops, D>
where Ops: UnwindSafe, T: UnwindSafe,

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: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> ToOwned for T
where T: Clone,

Source§

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

Source§

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>,

Source§

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>,

Source§

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.