pub struct GradientLengths { /* private fields */ }Expand description
Positive minimum and at-least-minimum preferred continuous-guide lengths.
Implementations§
Source§impl GradientLengths
impl GradientLengths
Sourcepub fn new(minimum: RelativeSpacing, preferred: RelativeSpacing) -> Result<Self>
pub fn new(minimum: RelativeSpacing, preferred: RelativeSpacing) -> Result<Self>
Construct positive lengths with preferred at least minimum under exact comparison.
Sourcepub fn get_minimum(&self) -> &RelativeSpacing
pub fn get_minimum(&self) -> &RelativeSpacing
Borrow the exact minimum relationship.
Sourcepub fn get_preferred(&self) -> &RelativeSpacing
pub fn get_preferred(&self) -> &RelativeSpacing
Borrow the exact preferred relationship.
Sourcepub fn minimum(self, minimum: RelativeSpacing) -> Result<Self>
pub fn minimum(self, minimum: RelativeSpacing) -> Result<Self>
Replace minimum, preserving the positive ordered length invariant.
Sourcepub fn preferred(self, preferred: RelativeSpacing) -> Result<Self>
pub fn preferred(self, preferred: RelativeSpacing) -> Result<Self>
Replace preference, preserving the positive ordered length invariant.
Trait Implementations§
Source§impl Clone for GradientLengths
impl Clone for GradientLengths
Source§impl Debug for GradientLengths
impl Debug for GradientLengths
impl Eq for GradientLengths
Source§impl PartialEq for GradientLengths
impl PartialEq for GradientLengths
impl StructuralPartialEq for GradientLengths
Auto Trait Implementations§
impl Forget for GradientLengths
impl Freeze for GradientLengths
impl Move for GradientLengths
impl RefUnwindSafe for GradientLengths
impl Send for GradientLengths
impl Sync for GradientLengths
impl Unpin for GradientLengths
impl UnsafeUnpin for GradientLengths
impl UnwindSafe for GradientLengths
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
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
impl<T> Scalar for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.