logos.lang.ops

Module lang · package logos-lang

Traits

traitAdd

trait Add

Overloads the binary + operator.

Implemented by: Wrapping$G1$i8 Wrapping$G1$i16 Wrapping$G1$i32 Wrapping$G1$i64 Wrapping$G1$u8 Wrapping$G1$u16 Wrapping$G1$u32 Wrapping$G1$u64 Saturating$G1$i32 Saturating$G1$i64 Saturating$G1$u32 Saturating$G1$u64

traitAddAssign

trait AddAssign

Overloads the += operator, adding rhs in place.

traitBitAnd

trait BitAnd

Overloads the binary & (bitwise AND) operator.

Implemented by: bool

traitBitAndAssign

trait BitAndAssign

Overloads the &= operator, bitwise-ANDing with rhs in place.

traitBitOr

trait BitOr

Overloads the binary | (bitwise OR) operator.

Implemented by: bool

traitBitOrAssign

trait BitOrAssign

Overloads the |= operator, bitwise-ORing with rhs in place.

traitBitXor

trait BitXor

Overloads the binary ^ (bitwise XOR) operator.

Implemented by: bool

traitBitXorAssign

trait BitXorAssign

Overloads the ^= operator, bitwise-XORing with rhs in place.

traitDeref

trait Deref

Overloads immutable dereference: *x on a Deref type yields the pointee.

Implemented by: Pin Pin Rc Arc Pin Box

traitDerefMut

trait DerefMut

Overloads mutable dereference; *x = v is not yet auto-dispatched (call deref_mut).

Implemented by: Pin Rc Arc Pin Box

traitDiv

trait Div

Overloads the binary / operator.

traitDivAssign

trait DivAssign

Overloads the /= operator, dividing by rhs in place.

traitFn

trait Fn

Overloads call syntax for callables that only read captured state.

traitFnMut

trait FnMut

Overloads call syntax for callables that may mutate captured state.

traitFnOnce

trait FnOnce

Overloads call syntax for callables consumed by the call (by-value receiver).

traitIndex

trait Index

Overloads immutable indexing: a[i] on user types (e.g. maps).

Implemented by: Vec

traitIndexMut

trait IndexMut

Overloads mutable indexing; a[i] = v is not yet auto-dispatched (call index_mut).

Implemented by: Vec

traitMul

trait Mul

Overloads the binary * operator.

Implemented by: Wrapping$G1$i8 Wrapping$G1$i16 Wrapping$G1$i32 Wrapping$G1$i64 Wrapping$G1$u8 Wrapping$G1$u16 Wrapping$G1$u32 Wrapping$G1$u64

traitMulAssign

trait MulAssign

Overloads the *= operator, multiplying by rhs in place.

traitNeg

trait Neg

Overloads the unary - (negation) operator.

traitNot

trait Not

Overloads the unary ! (logical/bitwise NOT) operator.

Implemented by: bool

traitRem

trait Rem

Overloads the binary % (remainder) operator.

traitRemAssign

trait RemAssign

Overloads the %= operator, taking the remainder by rhs in place.

traitShl

trait Shl

Overloads the binary << (left-shift) operator.

traitShlAssign

trait ShlAssign

Overloads the <<= operator, left-shifting by rhs in place.

traitShr

trait Shr

Overloads the binary >> (right-shift) operator.

traitShrAssign

trait ShrAssign

Overloads the >>= operator, right-shifting by rhs in place.

traitSub

trait Sub

Overloads the binary - operator.

Implemented by: Wrapping$G1$i8 Wrapping$G1$i16 Wrapping$G1$i32 Wrapping$G1$i64 Wrapping$G1$u8 Wrapping$G1$u16 Wrapping$G1$u32 Wrapping$G1$u64 Saturating$G1$i32 Saturating$G1$i64 Saturating$G1$u32 Saturating$G1$u64

traitSubAssign

trait SubAssign

Overloads the -= operator, subtracting rhs in place.

Types

enumControlFlow

enum ControlFlow

Directs short-circuiting operations: keep going with a C, or halt early with a B.

Variants

Break(B)
Continue(C)

Methods

fn break_value(self: ControlFlow) -> Option

Returns the Break payload as Some, or None if Continue; consumes self.

fn continue_value(self: ControlFlow) -> Option

Returns the Continue payload as Some, or None if Break; consumes self.

fn is_break(self: &ControlFlow) -> bool

Returns true if this is Break.

fn is_continue(self: &ControlFlow) -> bool

Returns true if this is Continue.

fn map_break(self: ControlFlow, f: MapBFn) -> ControlFlow

Maps the Break payload with f, passing Continue through unchanged.

fn map_continue(self: ControlFlow, f: MapCFn) -> ControlFlow

Maps the Continue payload with f, passing Break through unchanged.