pub struct Card { /* private fields */ }Expand description
A styled card surface.
Card::new().heading("Setup").show(ui, |ui| {
ui.label("Card contents go here.");
});Implementations§
Source§impl Card
impl Card
Sourcepub fn heading(self, heading: impl Into<WidgetText>) -> Self
pub fn heading(self, heading: impl Into<WidgetText>) -> Self
Show a small caption at the top of the card.
Sourcepub fn corner_radius(self, radius: impl Into<CornerRadius>) -> Self
pub fn corner_radius(self, radius: impl Into<CornerRadius>) -> Self
Override the corner radius (per-corner). Useful for segmented layouts where only some corners should be rounded.
Sourcepub fn show<R>(
self,
ui: &mut Ui,
add_contents: impl FnOnce(&mut Ui) -> R,
) -> InnerResponse<R>
pub fn show<R>( self, ui: &mut Ui, add_contents: impl FnOnce(&mut Ui) -> R, ) -> InnerResponse<R>
Render the card and its body contents, returning whatever the
closure returns inside an InnerResponse.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Card
impl RefUnwindSafe for Card
impl Send for Card
impl Sync for Card
impl Unpin for Card
impl UnsafeUnpin for Card
impl UnwindSafe for Card
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