pub struct Border { /* private fields */ }Expand description
A border widget that wraps content
Implementations§
Source§impl Border
impl Border
Sourcepub fn border_type(self, border_type: BorderType) -> Self
pub fn border_type(self, border_type: BorderType) -> Self
Set border type
Sourcepub fn min_height(self, height: u16) -> Self
pub fn min_height(self, height: u16) -> Self
Set minimum height constraint
Sourcepub fn max_height(self, height: u16) -> Self
pub fn max_height(self, height: u16) -> Self
Set maximum height constraint (0 = no limit)
Sourcepub fn max_size(self, width: u16, height: u16) -> Self
pub fn max_size(self, width: u16, height: u16) -> Self
Set both max width and height (0 = no limit)
Sourcepub fn constrain(self, min_w: u16, min_h: u16, max_w: u16, max_h: u16) -> Self
pub fn constrain(self, min_w: u16, min_h: u16, max_w: u16, max_h: u16) -> Self
Set all size constraints at once
Sourcepub fn success_box() -> Self
pub fn success_box() -> Self
Create a success box (single border with green color)
Trait Implementations§
Source§impl StyledView for Border
impl StyledView for Border
Source§fn remove_class(&mut self, class: &str)
fn remove_class(&mut self, class: &str)
Remove a CSS class
Source§fn toggle_class(&mut self, class: &str)
fn toggle_class(&mut self, class: &str)
Toggle a CSS class
Source§impl View for Border
impl View for Border
Source§fn render(&self, ctx: &mut RenderContext<'_>)
fn render(&self, ctx: &mut RenderContext<'_>)
Render the view to the given context Read more
Source§fn meta(&self) -> WidgetMeta
fn meta(&self) -> WidgetMeta
Get widget metadata for DOM Read more
Source§fn widget_type(&self) -> &'static str
fn widget_type(&self) -> &'static str
Get widget type name (for CSS type selectors) Read more
Source§fn needs_render(&self) -> bool
fn needs_render(&self) -> bool
Check if this widget needs re-rendering Read more
Auto Trait Implementations§
impl Freeze for Border
impl !RefUnwindSafe for Border
impl !Send for Border
impl !Sync for Border
impl Unpin for Border
impl UnsafeUnpin for Border
impl !UnwindSafe for Border
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