rok::core::ops
Operator traits: the source of every operator token.
rokc binds each token to the trait method carrying its #[infix] /
#[prefix] / #[postfix]; precedence and associativity are fixed by
the language (3.2.3). #[lang(...)] (6.4) binds each trait to a
compiler slot.
Modules
Traits
Add
pub trait Add<Rhs = Self>type Outputfn add(self, rhs: Rhs) -> Output
Modulo
pub trait Modulo<Rhs = Self>%%: floored modulo (2.3) - the result takes the divisor's sign, so
a positive divisor gives [0, rhs) (Python's %). No lang slot.
type Outputfn modulo(self, rhs: Rhs) -> Output
Sub
pub trait Sub<Rhs = Self>type Outputfn sub(self, rhs: Rhs) -> Output
Mul
pub trait Mul<Rhs = Self>type Outputfn mul(self, rhs: Rhs) -> Output
Div
pub trait Div<Rhs = Self>type Outputfn div(self, rhs: Rhs) -> Output
Rem
pub trait Rem<Rhs = Self>type Outputfn rem(self, rhs: Rhs) -> Output
Neg
pub trait Negtype Outputfn neg(self) -> Output
Not
pub trait Nottype Outputfn not(self) -> Output
BitNot
pub trait BitNottype Outputfn bitnot(self) -> Output
BitAnd
pub trait BitAnd<Rhs = Self>type Outputfn bitand(self, rhs: Rhs) -> Output
BitOr
pub trait BitOr<Rhs = Self>type Outputfn bitor(self, rhs: Rhs) -> Output
BitXor
pub trait BitXor<Rhs = Self>type Outputfn bitxor(self, rhs: Rhs) -> Output
Shl
pub trait Shl<Rhs = Self>type Outputfn shl(self, rhs: Rhs) -> Output
Shr
pub trait Shr<Rhs = Self>type Outputfn shr(self, rhs: Rhs) -> Output
PartialEq
pub trait PartialEq<Rhs = Self>fn eq(self, rhs: Rhs) -> boolconst fn ne(self, rhs: Rhs) -> bool
PartialOrd
pub trait PartialOrd<Rhs = Self>: PartialEq<Rhs>fn lt(self, rhs: Rhs) -> boolfn gt(self, rhs: Rhs) -> boolfn le(self, rhs: Rhs) -> boolfn ge(self, rhs: Rhs) -> boolconst fn partial_cmp(self, rhs: Rhs) -> rok::core::cmp::Ordering | noneThe order, or
nonewhen the two are incomparable (NaN).
LogicalAnd
pub trait LogicalAnd<Rhs = Self>fn logical_and(self, rhs: Rhs) -> bool
LogicalOr
pub trait LogicalOr<Rhs = Self>fn logical_or(self, rhs: Rhs) -> bool
AddAssign
pub trait AddAssign<Rhs = Self>+=
fn add_assign(ref self, rhs: Rhs)
SubAssign
pub trait SubAssign<Rhs = Self>-=
fn sub_assign(ref self, rhs: Rhs)
MulAssign
pub trait MulAssign<Rhs = Self>*=
fn mul_assign(ref self, rhs: Rhs)
DivAssign
pub trait DivAssign<Rhs = Self>/=
fn div_assign(ref self, rhs: Rhs)
RemAssign
pub trait RemAssign<Rhs = Self>%=
fn rem_assign(ref self, rhs: Rhs)
ModuloAssign
pub trait ModuloAssign<Rhs = Self>%%=
fn modulo_assign(ref self, rhs: Rhs)
BitAndAssign
pub trait BitAndAssign<Rhs = Self>&=
fn bitand_assign(ref self, rhs: Rhs)
BitOrAssign
pub trait BitOrAssign<Rhs = Self>|=
fn bitor_assign(ref self, rhs: Rhs)
BitXorAssign
pub trait BitXorAssign<Rhs = Self>^=
fn bitxor_assign(ref self, rhs: Rhs)
ShlAssign
pub trait ShlAssign<Rhs = Self><<=
fn shl_assign(ref self, rhs: Rhs)
ShrAssign
pub trait ShrAssign<Rhs = Self>>>=
fn shr_assign(ref self, rhs: Rhs)
DotAdd
pub trait DotAdd<Rhs = Self>type Outputfn dot_add(self, rhs: Rhs) -> Output
DotSub
pub trait DotSub<Rhs = Self>type Outputfn dot_sub(self, rhs: Rhs) -> Output
DotMul
pub trait DotMul<Rhs = Self>type Outputfn dot_mul(self, rhs: Rhs) -> Output
DotDiv
pub trait DotDiv<Rhs = Self>type Outputfn dot_div(self, rhs: Rhs) -> Output
DotRem
pub trait DotRem<Rhs = Self>type Outputfn dot_rem(self, rhs: Rhs) -> Output
DotModulo
pub trait DotModulo<Rhs = Self>type Outputfn dot_modulo(self, rhs: Rhs) -> Output
DotEq
pub trait DotEq<Rhs = Self>type Outputfn dot_eq(self, rhs: Rhs) -> Output
DotNe
pub trait DotNe<Rhs = Self>type Outputfn dot_ne(self, rhs: Rhs) -> Output
DotLt
pub trait DotLt<Rhs = Self>type Outputfn dot_lt(self, rhs: Rhs) -> Output
DotGt
pub trait DotGt<Rhs = Self>type Outputfn dot_gt(self, rhs: Rhs) -> Output
DotLe
pub trait DotLe<Rhs = Self>type Outputfn dot_le(self, rhs: Rhs) -> Output
DotGe
pub trait DotGe<Rhs = Self>type Outputfn dot_ge(self, rhs: Rhs) -> Output
DotLogicalAnd
pub trait DotLogicalAnd<Rhs = Self>.&& / .||: element-wise, both sides always evaluated (2.6).
type Outputfn dot_logical_and(self, rhs: Rhs) -> Output
DotLogicalOr
pub trait DotLogicalOr<Rhs = Self>type Outputfn dot_logical_or(self, rhs: Rhs) -> Output
DotBitAnd
pub trait DotBitAnd<Rhs = Self>type Outputfn dot_bitand(self, rhs: Rhs) -> Output
DotBitOr
pub trait DotBitOr<Rhs = Self>type Outputfn dot_bitor(self, rhs: Rhs) -> Output
DotBitXor
pub trait DotBitXor<Rhs = Self>type Outputfn dot_bitxor(self, rhs: Rhs) -> Output
DotShl
pub trait DotShl<Rhs = Self>type Outputfn dot_shl(self, rhs: Rhs) -> Output
DotShr
pub trait DotShr<Rhs = Self>type Outputfn dot_shr(self, rhs: Rhs) -> Output
Cross
pub trait Cross<Rhs = Self>type Outputfn cross(self, rhs: Rhs) -> Output
Dot
pub trait Dot<Rhs = Self>type Outputfn dot(self, rhs: Rhs) -> Output
Compose
pub trait Compose<Rhs>type Outputfn compose(self, rhs: Rhs) -> Output
Sqrt
pub trait Sqrttype Outputfn sqrt(self) -> Output
Contains
pub trait Contains<Item>fn contains(self, item: Item) -> boolconst fn not_contains(self, item: Item) -> bool
Subset
pub trait Subset<Rhs = Self>fn is_proper_subset(self, rhs: Rhs) -> boolfn is_subset(self, rhs: Rhs) -> bool
Union
pub trait Union<Rhs = Self>type Outputfn union(self, rhs: Rhs) -> Output
Intersect
pub trait Intersect<Rhs = Self>type Outputfn intersection(self, rhs: Rhs) -> Output