#[repr(C)]pub enum LayoutOverflow {
Scroll = 0,
Auto = 1,
Hidden = 2,
Visible = 3,
}
Expand description
Represents a overflow-x
or overflow-y
property, see
TextOverflowBehaviour
- default: Auto
Variants§
Scroll = 0
Always shows a scroll bar, overflows on scroll
Auto = 1
Does not show a scroll bar by default, only when text is overflowing
Hidden = 2
Never shows a scroll bar, simply clips text
Visible = 3
Doesn’t show a scroll bar, simply overflows the text
Implementations§
Source§impl LayoutOverflow
impl LayoutOverflow
Sourcepub fn needs_scrollbar(&self, currently_overflowing: bool) -> bool
pub fn needs_scrollbar(&self, currently_overflowing: bool) -> bool
Returns whether this overflow value needs to display the scrollbars.
overflow:scroll
always shows the scrollbaroverflow:auto
only shows the scrollbar when the content is currently overflowingoverflow:hidden
andoverflow:visible
do not show any scrollbars
Sourcepub fn is_overflow_visible(&self) -> bool
pub fn is_overflow_visible(&self) -> bool
Returns whether this is an overflow:visible
node
(the only overflow type that doesn’t clip its children)
Trait Implementations§
Source§impl Clone for LayoutOverflow
impl Clone for LayoutOverflow
Source§fn clone(&self) -> LayoutOverflow
fn clone(&self) -> LayoutOverflow
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for LayoutOverflow
impl Debug for LayoutOverflow
Source§impl Default for LayoutOverflow
impl Default for LayoutOverflow
Source§impl Hash for LayoutOverflow
impl Hash for LayoutOverflow
Source§impl Ord for LayoutOverflow
impl Ord for LayoutOverflow
Source§fn cmp(&self, other: &LayoutOverflow) -> Ordering
fn cmp(&self, other: &LayoutOverflow) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for LayoutOverflow
impl PartialEq for LayoutOverflow
Source§impl PartialOrd for LayoutOverflow
impl PartialOrd for LayoutOverflow
Source§impl PrintAsCssValue for LayoutOverflow
impl PrintAsCssValue for LayoutOverflow
fn print_as_css_value(&self) -> String
impl Copy for LayoutOverflow
impl Eq for LayoutOverflow
impl StructuralPartialEq for LayoutOverflow
Auto Trait Implementations§
impl Freeze for LayoutOverflow
impl RefUnwindSafe for LayoutOverflow
impl Send for LayoutOverflow
impl Sync for LayoutOverflow
impl Unpin for LayoutOverflow
impl UnwindSafe for LayoutOverflow
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