baml.ops.Negate
The unary negation operator, `-self`.
Reference version
Signature
interface baml.ops.NegateThe unary negation operator, -self.
Takes no Rhs — it is single dispatch on the one operand — so it
corresponds to Rust's
ops::Neg rather than
to baml.ops.Subtract.
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/math.bamlbytes 7276–7577
Associated types
type Output
Required instance methods
function
neg
(self) -> (Self as baml.ops.Negate).Output throws neverNegates self.