pub struct Card { /* private fields */ }Expand description
A surface grouping related content, with optional header and footer.
let card = Card![CardHeader![h3!["Plan"]], CardBody![p!["Pro"]], CardFooter![Button!["Upgrade"]]];
assert!(render_static(card).contains(r#"<div class="nr-card nr-card-shadow-md">"#));Implementations§
Source§impl Card
impl Card
pub fn new() -> Self
Sourcepub fn class(self, v: impl Into<String>) -> Self
pub fn class(self, v: impl Into<String>) -> Self
Extra classes for the outer element. They win over the defaults.
Sourcepub fn with(self, part: impl Part) -> Self
pub fn with(self, part: impl Part) -> Self
Add an attribute (class(..), id(..), aria(..), …) or a child.
pub fn shadow(self, v: Shadow) -> Self
pub fn radius(self, v: Radius) -> Self
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Card
impl !Sync for Card
impl !UnwindSafe for Card
impl Forget for Card
impl Freeze for Card
impl Move for Card
impl Send for Card
impl Unpin for Card
impl UnsafeUnpin 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