pub struct TextClamp {
pub max_lines: Option<u32>,
pub max_height: f32,
pub ellipsis: Option<String>,
}Expand description
Lines past the clamp point (line_limit) are discarded, as CSS line-clamp discards them.
A cut text’s last line ends with the ellipsis, one more cluster (ClusterInfo::ellipsis).
Fields§
§max_lines: Option<u32>Most lines, at least 1, as CSS max-lines; None sets no count.
max_height: f32Height in pixels the kept lines’ box fits in, as the automatic clamp point of CSS
max-lines: auto; non-positive sets no height.
ellipsis: Option<String>What ends a cut line, as CSS block-ellipsis, at most MAX_ELLIPSIS_BYTES bytes with
no \n; None cuts without a mark.
Trait Implementations§
impl StructuralPartialEq for TextClamp
Auto Trait Implementations§
impl Forget for TextClamp
impl Freeze for TextClamp
impl Move for TextClamp
impl RefUnwindSafe for TextClamp
impl Send for TextClampwhere
RawVecInner: Send,
impl Sync for TextClampwhere
RawVecInner: Sync,
impl Unpin for TextClamp
impl UnsafeUnpin for TextClamp
impl UnwindSafe for TextClampwhere
RawVecInner: UnwindSafe,
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