#[repr(C)]pub enum LayoutOverflow {
Scroll = 0,
Auto = 1,
Hidden = 2,
Visible = 3,
Clip = 4,
}Expand description
Represents an overflow-x or overflow-y property.
Determines what to do when content overflows an element’s box.
Variants§
Scroll = 0
Always shows a scroll bar, overflows on scroll.
Auto = 1
Shows a scroll bar only when content overflows.
Hidden = 2
Clips overflowing content. The rest of the content will be invisible.
Visible = 3
Content is not clipped and renders outside the element’s box. This is the CSS default.
Clip = 4
Similar to hidden, clips the content at the box’s edge.
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 requires a scrollbar to be displayed.
overflow: scrollalways shows the scrollbar.overflow: autoonly shows the scrollbar if the content is currently overflowing.overflow: hidden,overflow: visible, andoverflow: clipdo not show any scrollbars.
pub fn is_clipped(&self) -> bool
pub fn is_scroll(&self) -> bool
Sourcepub fn is_overflow_visible(&self) -> bool
pub fn is_overflow_visible(&self) -> bool
Returns true if the overflow type is visible, which is the only
overflow type that doesn’t clip its children.
Returns true if the overflow type is hidden.
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§fn default() -> LayoutOverflow
fn default() -> LayoutOverflow
Returns the “default value” for a type. Read more
Source§impl FormatAsRustCode for LayoutOverflow
impl FormatAsRustCode for LayoutOverflow
fn format_as_rust_code(&self, _tabs: usize) -> String
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