pub struct GradientRule {
pub minpoint: Option<InterpolationPoint>,
pub midpoint: Option<InterpolationPoint>,
pub maxpoint: Option<InterpolationPoint>,
}Expand description
GradientRule — a color scale of two or three InterpolationPoints.
midpoint absent means a plain two-color scale.
A documented cut (issue #1793), mirroring validation.rs’s “curate
rather than chase every enum value” stance: the endpoints this crate
builds are always anchored MIN/MAX. Sheets also allows an endpoint to
be anchored at an explicit NUMBER/PERCENT/PERCENTILE value, which
this crate doesn’t build — docs/drive.md names this gap — but reads
back from a rule made in the Sheets UI.
Every point is optional, as in the API: this crate always sets
minpoint/maxpoint when building a rule, and never sends back a rule
it read, so the optionality only makes reads tolerant (issue #1944).
Fields§
§minpoint: Option<InterpolationPoint>The low end of the scale.
midpoint: Option<InterpolationPoint>An optional midpoint.
maxpoint: Option<InterpolationPoint>The high end of the scale.
Trait Implementations§
Source§impl Clone for GradientRule
impl Clone for GradientRule
Source§impl Debug for GradientRule
impl Debug for GradientRule
Source§impl Default for GradientRule
impl Default for GradientRule
Source§impl<'de> Deserialize<'de> for GradientRule
impl<'de> Deserialize<'de> for GradientRule
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for GradientRule
impl PartialEq for GradientRule
Source§impl Serialize for GradientRule
impl Serialize for GradientRule
impl StructuralPartialEq for GradientRule
Auto Trait Implementations§
impl Freeze for GradientRule
impl RefUnwindSafe for GradientRule
impl Send for GradientRule
impl Sync for GradientRule
impl Unpin for GradientRule
impl UnsafeUnpin for GradientRule
impl UnwindSafe for GradientRule
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more