Struct nu_source::DebugDocBuilder
source · [−]pub struct DebugDocBuilder {
pub inner: DocBuilder<'static, BoxAllocator, ShellAnnotation>,
}
Fields
inner: DocBuilder<'static, BoxAllocator, ShellAnnotation>
Implementations
sourceimpl 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
.
sourceimpl 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
sourceimpl Add<DebugDocBuilder> for DebugDocBuilder
impl Add<DebugDocBuilder> for DebugDocBuilder
type Output = DebugDocBuilder
type Output = DebugDocBuilder
The resulting type after applying the +
operator.
sourcefn add(self, rhs: DebugDocBuilder) -> DebugDocBuilder
fn add(self, rhs: DebugDocBuilder) -> DebugDocBuilder
Performs the +
operation. Read more
sourceimpl Clone for DebugDocBuilder
impl Clone for DebugDocBuilder
sourcefn clone(&self) -> DebugDocBuilder
fn clone(&self) -> DebugDocBuilder
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Deref for DebugDocBuilder
impl Deref for DebugDocBuilder
type Target = DocBuilder<'static, BoxAllocator, ShellAnnotation>
type Target = DocBuilder<'static, BoxAllocator, ShellAnnotation>
The resulting type after dereferencing.
sourceimpl From<DebugDocBuilder> for Doc<'static, BoxDoc<'static, ShellAnnotation>, ShellAnnotation>
impl From<DebugDocBuilder> for Doc<'static, BoxDoc<'static, ShellAnnotation>, ShellAnnotation>
sourcefn from(x: DebugDocBuilder) -> Self
fn from(x: DebugDocBuilder) -> Self
Performs the conversion.
sourceimpl From<DocBuilder<'static, BoxAllocator, ShellAnnotation>> for DebugDocBuilder
impl From<DocBuilder<'static, BoxAllocator, ShellAnnotation>> for DebugDocBuilder
sourcefn from(x: DocBuilder<'static, BoxAllocator, ShellAnnotation>) -> Self
fn from(x: DocBuilder<'static, BoxAllocator, ShellAnnotation>) -> Self
Performs the conversion.
sourceimpl 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>
sourcefn 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. Read more
fn plain_string(&self, width: usize) -> String
fn colored_string(&self, width: usize) -> String
Auto Trait Implementations
impl RefUnwindSafe for DebugDocBuilder
impl Send for DebugDocBuilder
impl Sync for DebugDocBuilder
impl Unpin for DebugDocBuilder
impl UnwindSafe for DebugDocBuilder
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more