pub struct DebugDocBuilder {
pub inner: DocBuilder<'static, BoxAllocator, ShellAnnotation>,
}
Fields§
§inner: DocBuilder<'static, BoxAllocator, ShellAnnotation>
Implementations§
Source§impl DebugDocBuilder
impl DebugDocBuilder
Sourcepub fn new(inner: DocBuilder<'static, BoxAllocator, ShellAnnotation>) -> Self
pub fn new(inner: DocBuilder<'static, BoxAllocator, ShellAnnotation>) -> Self
Constructs a new DebugDocBuilder
.
Source§impl DebugDocBuilder
impl DebugDocBuilder
pub fn from_doc(doc: DebugDoc) -> DebugDocBuilder
pub fn blank() -> DebugDocBuilder
pub fn delimiter(string: impl Display) -> DebugDocBuilder
pub fn key(string: impl Display) -> DebugDocBuilder
pub fn value(string: impl Display) -> DebugDocBuilder
pub fn into_value(self) -> DebugDocBuilder
pub fn equals() -> DebugDocBuilder
pub fn kind(string: impl Display) -> DebugDocBuilder
pub fn into_kind(self) -> DebugDocBuilder
pub fn typed(kind: &str, value: DebugDocBuilder) -> DebugDocBuilder
pub fn subtyped( kind: &str, subkind: impl Display, value: DebugDocBuilder, ) -> DebugDocBuilder
pub fn keyword(string: impl Display) -> DebugDocBuilder
pub fn var(string: impl Display) -> DebugDocBuilder
pub fn operator(string: impl Display) -> DebugDocBuilder
pub fn primitive(string: impl Display) -> DebugDocBuilder
pub fn opaque(string: impl Display) -> DebugDocBuilder
pub fn description(string: impl Display) -> DebugDocBuilder
pub fn error(string: impl Display) -> DebugDocBuilder
pub fn delimit(start: &str, doc: DebugDocBuilder, end: &str) -> DebugDocBuilder
pub fn preceded( before: DebugDocBuilder, body: DebugDocBuilder, ) -> DebugDocBuilder
pub fn surrounded_option( before: Option<DebugDocBuilder>, builder: Option<DebugDocBuilder>, after: Option<DebugDocBuilder>, ) -> DebugDocBuilder
pub fn preceded_option( before: Option<DebugDocBuilder>, builder: Option<DebugDocBuilder>, ) -> DebugDocBuilder
pub fn option(builder: Option<DebugDocBuilder>) -> DebugDocBuilder
pub fn space() -> DebugDocBuilder
pub fn newline() -> DebugDocBuilder
pub fn is_empty(&self) -> bool
pub fn or(self, doc: DebugDocBuilder) -> DebugDocBuilder
pub fn group(self) -> DebugDocBuilder
pub fn nest(self) -> DebugDocBuilder
pub fn intersperse_with_source<'a, T: PrettyDebugWithSource + 'a>( list: impl IntoIterator<Item = &'a T>, separator: DebugDocBuilder, source: &str, ) -> DebugDocBuilder
pub fn intersperse<T: PrettyDebug>( list: impl IntoIterator<Item = T>, separator: DebugDocBuilder, ) -> DebugDocBuilder
pub fn list(list: impl IntoIterator<Item = DebugDocBuilder>) -> DebugDocBuilder
Trait Implementations§
Source§impl Add for DebugDocBuilder
impl Add for DebugDocBuilder
Source§type Output = DebugDocBuilder
type Output = DebugDocBuilder
The resulting type after applying the
+
operator.Source§fn add(self, rhs: DebugDocBuilder) -> DebugDocBuilder
fn add(self, rhs: DebugDocBuilder) -> DebugDocBuilder
Performs the
+
operation. Read moreSource§impl Clone for DebugDocBuilder
impl Clone for DebugDocBuilder
Source§fn clone(&self) -> DebugDocBuilder
fn clone(&self) -> DebugDocBuilder
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Deref for DebugDocBuilder
impl Deref for DebugDocBuilder
Source§type Target = DocBuilder<'static, BoxAllocator, ShellAnnotation>
type Target = DocBuilder<'static, BoxAllocator, ShellAnnotation>
The resulting type after dereferencing.
Source§impl From<DebugDocBuilder> for Doc<'static, BoxDoc<'static, ShellAnnotation>, ShellAnnotation>
impl From<DebugDocBuilder> for Doc<'static, BoxDoc<'static, ShellAnnotation>, ShellAnnotation>
Source§fn from(x: DebugDocBuilder) -> Self
fn from(x: DebugDocBuilder) -> Self
Converts to this type from the input type.
Source§impl From<DocBuilder<'static, BoxAllocator, ShellAnnotation>> for DebugDocBuilder
impl From<DocBuilder<'static, BoxAllocator, ShellAnnotation>> for DebugDocBuilder
Source§fn from(x: DocBuilder<'static, BoxAllocator, ShellAnnotation>) -> Self
fn from(x: DocBuilder<'static, BoxAllocator, ShellAnnotation>) -> Self
Converts to this type from the input type.
Source§impl PrettyDebug for DebugDocBuilder
impl PrettyDebug for DebugDocBuilder
fn pretty(&self) -> DebugDocBuilder
fn to_doc(&self) -> DebugDoc
fn pretty_doc( &self, ) -> Doc<'static, BoxDoc<'static, ShellAnnotation>, ShellAnnotation>
fn pretty_builder(&self) -> DocBuilder<'static, BoxAllocator, ShellAnnotation>
Source§fn display(&self) -> String
fn display(&self) -> String
A convenience method that prints out the document without colors in
70 columns. Generally, you should use plain_string or colored_string
if possible, but display() can be useful for trace lines and things
like that, where you don’t have control over the terminal.
fn plain_string(&self, width: usize) -> String
fn colored_string(&self, width: usize) -> String
Auto Trait Implementations§
impl Freeze for DebugDocBuilder
impl RefUnwindSafe for DebugDocBuilder
impl Send for DebugDocBuilder
impl Sync for DebugDocBuilder
impl Unpin for DebugDocBuilder
impl UnwindSafe for DebugDocBuilder
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