pub struct TextFit { /* private fields */ }Expand description
A font-size program, independent of terminal overflow handling.
Implementations§
Source§impl TextFit
impl TextFit
Sourcepub fn shrink_to(minimum: f64) -> Result<TextFit, Error>
pub fn shrink_to(minimum: f64) -> Result<TextFit, Error>
Permit shrinking to a positive finite floor.
Sourcepub fn range(minimum: f64, maximum: f64) -> Result<TextFit, Error>
pub fn range(minimum: f64, maximum: f64) -> Result<TextFit, Error>
Permit growth and shrink within one closed positive finite interval.
Sourcepub const fn grouping(self, value: TextFitGrouping) -> TextFit
pub const fn grouping(self, value: TextFitGrouping) -> TextFit
Replace the size grouping, without changing the permitted interval.
Sourcepub const fn get_minimum(&self) -> Option<f64>
pub const fn get_minimum(&self) -> Option<f64>
Authored absolute minimum, absent when the preferred size is fixed.
Sourcepub const fn get_maximum(&self) -> Option<f64>
pub const fn get_maximum(&self) -> Option<f64>
Authored absolute maximum, absent for preferred-size and shrink programs.
Sourcepub const fn get_grouping(&self) -> TextFitGrouping
pub const fn get_grouping(&self) -> TextFitGrouping
Requested grouping, without resolving any role’s preferred size.
Trait Implementations§
impl Copy for TextFit
impl Eq for TextFit
impl StructuralPartialEq for TextFit
Auto Trait Implementations§
impl Forget for TextFit
impl Freeze for TextFit
impl Move for TextFit
impl RefUnwindSafe for TextFit
impl Send for TextFit
impl Sync for TextFit
impl Unpin for TextFit
impl UnsafeUnpin for TextFit
impl UnwindSafe for TextFit
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.