pub struct Card { /* private fields */ }Expand description
A surface container with an optional header (title + description).
Implementations§
Source§impl Card
impl Card
pub fn new() -> Self
pub fn title(self, t: impl Into<String>) -> Self
pub fn description(self, d: impl Into<String>) -> Self
pub fn padding(self, p: f32) -> Self
pub fn variant(self, v: CardVariant) -> Self
Sourcepub fn show<R>(
self,
ui: &mut Ui,
body: impl FnOnce(&mut Ui) -> R,
) -> InnerResponse<R>
pub fn show<R>( self, ui: &mut Ui, body: impl FnOnce(&mut Ui) -> R, ) -> InnerResponse<R>
Render the card frame and run body inside it, returning the body’s
value alongside the frame egui::Response.
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