pub trait CalcAdd: Sized {
type Error: Display;
const ZERO: Self;
// Required methods
fn try_add(a: Self, b: Self) -> Result<Self, Self::Error>;
fn try_sub(a: Self, b: Self) -> Result<Self, Self::Error>;
}
Expand description
A trait for values that support addition and subtraction inside CSS calc()
expressions.
Required Associated Constants§
Required Associated Types§
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.