Skip to main content

Card

Struct Card 

Source
pub struct Card<'a, A: Render, B: Render> {
    pub title: &'a str,
    pub actions: A,
    pub body: B,
    pub padded_body: bool,
}
Expand description

Framed card with header, optional right-aligned actions, and body slot.

Fields§

§title: &'a str§actions: A§body: B§padded_body: bool

Implementations§

Source§

impl<'a, A: Render, B: Render> Card<'a, A, B>

Source

pub fn new(title: &'a str, actions: A, body: B) -> Self

Source

pub fn flush(title: &'a str, actions: A, body: B) -> Self

Source§

impl<'a, B: Render> Card<'a, (), B>

Source

pub fn simple(title: &'a str, body: B) -> Self

Source

pub fn flush_simple(title: &'a str, body: B) -> Self

Trait Implementations§

Source§

impl<A: Render, B: Render> Render for Card<'_, A, B>

Source§

fn render_to(&self, out: &mut HtmlBuf)

Source§

fn render_to_string(&self) -> String

Convenience helper to render a standalone fragment to String.

Auto Trait Implementations§

§

impl<'a, A, B> Forget for Card<'a, A, B>

§

impl<'a, A, B> Freeze for Card<'a, A, B>
where &'a str: Freeze, A: Freeze, B: Freeze,

§

impl<'a, A, B> Move for Card<'a, A, B>

§

impl<'a, A, B> RefUnwindSafe for Card<'a, A, B>

§

impl<'a, A, B> Send for Card<'a, A, B>
where B: Send, A: Send, &'a str: Send,

§

impl<'a, A, B> Sync for Card<'a, A, B>
where B: Sync, A: Sync,

§

impl<'a, A, B> Unpin for Card<'a, A, B>
where B: Unpin, A: Unpin, &'a str: Unpin,

§

impl<'a, A, B> UnsafeUnpin for Card<'a, A, B>

§

impl<'a, A, B> UnwindSafe for Card<'a, A, B>
where &'a str: UnwindSafe, A: UnwindSafe, B: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.