baml.ops.ShiftRight

The right-shift operator, `self >> rhs`.

Reference version

Signature

interface baml.ops.ShiftRight<Rhs extends baml.Concrete>

The right-shift operator, self >> rhs.

The mirror of baml.ops.ShiftLeft, with the same Rhs-is-the-count shape as Rust's ops::Shr and the same rule that a bigint count widens the shifted value.

There is no separate logical-shift operator — JavaScript's >>> has no counterpart here. The integer impls shift arithmetically: the sign bit is propagated rather than zeros fed in, so -16 >> 2 is -4, and a count at or past the operand's width saturates to the sign rather than being an error.

An implementation may panic, which throws never does not rule out; a caller working through a generic bound cannot enumerate the panics and must be ready for one it cannot describe. See baml.ops.Add.

Source:<builtin>/baml/ns_ops/bitwise.bamlbytes 63626765

Associated types

type Output

Required instance methods

function

shr

(self, rhs: Rhs) -> (Self as baml.ops.ShiftRight<Rhs>).Output throws never

Shifts self right by rhs bit positions.