pub trait Fold {
// Required method
fn fold(self, outer: Self) -> Self;
}Expand description
A property that is folded to determine its final value.
In the example below, the chain of stroke values is folded into a single
value: 4pt + red.
#set rect(stroke: red)
#set rect(stroke: 4pt)
#rect()Note: Folding must be associative, i.e. any implementation must satisfy
fold(fold(a, b), c) == fold(a, fold(b, c)).
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.