pub trait GradientStr {
// Required method
fn gradient<I>(&self, colors: I) -> GradientDisplay<'_, I>
where I: IntoIterator<Item = RGB> + Clone,
I::IntoIter: ExactSizeIterator + Clone;
}
Expand description
Methods to colorize string with a gradient.
Required Methods§
Sourcefn gradient<I>(&self, colors: I) -> GradientDisplay<'_, I>
fn gradient<I>(&self, colors: I) -> GradientDisplay<'_, I>
This function takes a list of colors, which represent a gradient, and colorizes the string.
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.