pub struct Doc { /* private fields */ }Expand description
Top-level buffered document. Built then handed to Printer::emit.
Implementations§
Source§impl Doc
impl Doc
pub fn new() -> Self
pub fn heading(self, text: impl Into<String>) -> Self
pub fn kv(self, key: impl Into<String>, value: impl Into<String>) -> Self
pub fn kv_block<I, K, V>(self, pairs: I) -> Self
pub fn status(self, role: Role, subject: impl Into<String>) -> Self
pub fn status_with( self, role: Role, subject: impl Into<String>, build: impl FnOnce(StatusFields) -> StatusFields, ) -> Self
pub fn hint(self, text: impl Into<String>) -> Self
pub fn note(self, text: impl Into<String>) -> Self
pub fn table(self, t: Table) -> Self
pub fn section<F>(self, name: impl Into<String>, build: F) -> Self
pub fn section_or_collapse<F>(self, name: impl Into<String>, build: F) -> Self
pub fn section_if_nonempty<T, F>( self, name: impl Into<String>, items: &[T], build: F, ) -> Self
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Doc
impl RefUnwindSafe for Doc
impl Send for Doc
impl Sync for Doc
impl Unpin for Doc
impl UnsafeUnpin for Doc
impl UnwindSafe for Doc
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