Struct nu_source::DebugDoc [−][src]
pub struct DebugDoc {
pub inner: Doc<'static, BoxDoc<'static, ShellAnnotation>, ShellAnnotation>,
}Fields
inner: Doc<'static, BoxDoc<'static, ShellAnnotation>, ShellAnnotation>Implementations
impl DebugDoc[src]
impl DebugDoc[src]pub fn new(
inner: Doc<'static, BoxDoc<'static, ShellAnnotation>, ShellAnnotation>
) -> Self[src]
pub fn new(
inner: Doc<'static, BoxDoc<'static, ShellAnnotation>, ShellAnnotation>
) -> Self[src]Constructs a new DebugDoc.
Methods from Deref<Target = Doc<'static, BoxDoc<'static, ShellAnnotation>, ShellAnnotation>>
pub fn render<'b, W>(&'b self, width: usize, out: &mut W) -> Result<(), Error> where
T: Deref<Target = Doc<'b, T, A>>,
W: Write + ?Sized, [src]
pub fn render<'b, W>(&'b self, width: usize, out: &mut W) -> Result<(), Error> where
T: Deref<Target = Doc<'b, T, A>>,
W: Write + ?Sized, [src]Writes a rendered document to a std::io::Write object.
pub fn render_fmt<'b, W>(
&'b self,
width: usize,
out: &mut W
) -> Result<(), Error> where
T: Deref<Target = Doc<'b, T, A>>,
W: Write + ?Sized, [src]
pub fn render_fmt<'b, W>(
&'b self,
width: usize,
out: &mut W
) -> Result<(), Error> where
T: Deref<Target = Doc<'b, T, A>>,
W: Write + ?Sized, [src]Writes a rendered document to a std::fmt::Write object.
pub fn render_raw<'b, W>(
&'b self,
width: usize,
out: &mut W
) -> Result<(), <W as Render>::Error> where
T: Deref<Target = Doc<'b, T, A>>,
W: RenderAnnotated<A> + ?Sized, [src]
pub fn render_raw<'b, W>(
&'b self,
width: usize,
out: &mut W
) -> Result<(), <W as Render>::Error> where
T: Deref<Target = Doc<'b, T, A>>,
W: RenderAnnotated<A> + ?Sized, [src]Writes a rendered document to a RenderAnnotated<A> object.
pub fn pretty<'b>(&'b self, width: usize) -> Pretty<'b, T, A> where
T: Deref<Target = Doc<'b, T, A>>, [src]
pub fn pretty<'b>(&'b self, width: usize) -> Pretty<'b, T, A> where
T: Deref<Target = Doc<'b, T, A>>, [src]Returns a value which implements std::fmt::Display
use pretty::Doc; let doc = Doc::<_>::group( Doc::text("hello").append(Doc::space()).append(Doc::text("world")) ); assert_eq!(format!("{}", doc.pretty(80)), "hello world");
Trait Implementations
impl Deref for DebugDoc[src]
impl Deref for DebugDoc[src]type Target = Doc<'static, BoxDoc<'static, ShellAnnotation>, ShellAnnotation>
type Target = Doc<'static, BoxDoc<'static, ShellAnnotation>, ShellAnnotation>The resulting type after dereferencing.
impl From<DebugDoc> for Doc<'static, BoxDoc<'static, ShellAnnotation>, ShellAnnotation>[src]
impl From<DebugDoc> for Doc<'static, BoxDoc<'static, ShellAnnotation>, ShellAnnotation>[src]fn from(
input: DebugDoc
) -> Doc<'static, BoxDoc<'static, ShellAnnotation>, ShellAnnotation>[src]
fn from(
input: DebugDoc
) -> Doc<'static, BoxDoc<'static, ShellAnnotation>, ShellAnnotation>[src]Performs the conversion.
impl Ord for DebugDoc[src]
impl Ord for DebugDoc[src]impl PartialOrd<DebugDoc> for DebugDoc[src]
impl PartialOrd<DebugDoc> for DebugDoc[src]fn partial_cmp(&self, other: &DebugDoc) -> Option<Ordering>[src]
fn partial_cmp(&self, other: &DebugDoc) -> Option<Ordering>[src]This method returns an ordering between self and other values if one exists. Read more
#[must_use]fn lt(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]fn lt(&self, other: &Rhs) -> bool1.0.0[src]This method tests less than (for self and other) and is used by the < operator. Read more
#[must_use]fn le(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]fn le(&self, other: &Rhs) -> bool1.0.0[src]This method tests less than or equal to (for self and other) and is used by the <=
operator. Read more
impl PrettyDebug for DebugDoc[src]
impl PrettyDebug for DebugDoc[src]fn pretty(&self) -> DebugDocBuilder[src]
fn to_doc(&self) -> DebugDoc[src]
fn pretty_doc(
&self
) -> Doc<'static, BoxDoc<'static, ShellAnnotation>, ShellAnnotation>[src]
&self
) -> Doc<'static, BoxDoc<'static, ShellAnnotation>, ShellAnnotation>
fn pretty_builder(&self) -> DocBuilder<'static, BoxAllocator, ShellAnnotation>[src]
fn display(&self) -> String[src]
fn display(&self) -> String[src]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[src]
fn colored_string(&self, width: usize) -> String[src]
impl Eq for DebugDoc[src]
impl StructuralEq for DebugDoc[src]
impl StructuralPartialEq for DebugDoc[src]
Auto Trait Implementations
impl RefUnwindSafe for DebugDoc
impl Send for DebugDoc
impl Sync for DebugDoc
impl Unpin for DebugDoc
impl UnwindSafe for DebugDoc
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]pub fn borrow_mut(&mut self) -> &mut T[src]
pub fn borrow_mut(&mut self) -> &mut T[src]Mutably borrows from an owned value. Read more
impl<T> ToOwned for T where
T: Clone, [src]
impl<T> ToOwned for T where
T: Clone, [src]type Owned = T
type Owned = TThe resulting type after obtaining ownership.
pub fn to_owned(&self) -> T[src]
pub fn to_owned(&self) -> T[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)[src]
pub fn clone_into(&self, target: &mut T)[src]🔬 This is a nightly-only experimental API. (toowned_clone_into)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more