pub struct Heading { /* private fields */ }Expand description
A section title with an optional description sub-line.
Implementations§
Source§impl Heading
impl Heading
pub fn new(text: impl Into<String>) -> Self
pub fn level(self, level: HeadingLevel) -> Self
pub fn h1(self) -> Self
pub fn h2(self) -> Self
pub fn h3(self) -> Self
pub fn h4(self) -> Self
Sourcepub fn description(self, text: impl Into<String>) -> Self
pub fn description(self, text: impl Into<String>) -> Self
A muted description rendered on its own line beneath the title.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Heading
impl RefUnwindSafe for Heading
impl Send for Heading
impl Sync for Heading
impl Unpin for Heading
impl UnsafeUnpin for Heading
impl UnwindSafe for Heading
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