[−][src]Struct nu_source::DebugDoc
Fields
inner: Doc<'static, BoxDoc<'static, ShellAnnotation>, ShellAnnotation>
Implementations
impl DebugDoc
[src]
pub fn new(
inner: Doc<'static, BoxDoc<'static, ShellAnnotation>, ShellAnnotation>
) -> Self
[src]
inner: Doc<'static, BoxDoc<'static, ShellAnnotation>, ShellAnnotation>
) -> Self
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]
T: Deref<Target = Doc<'b, T, A>>,
W: Write + ?Sized,
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]
&'b self,
width: usize,
out: &mut W
) -> Result<(), Error> where
T: Deref<Target = Doc<'b, T, A>>,
W: Write + ?Sized,
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]
&'b self,
width: usize,
out: &mut W
) -> Result<(), <W as Render>::Error> where
T: Deref<Target = Doc<'b, T, A>>,
W: RenderAnnotated<A> + ?Sized,
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]
T: Deref<Target = Doc<'b, T, A>>,
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 Clone for DebugDoc
[src]
impl Debug for DebugDoc
[src]
impl Deref for DebugDoc
[src]
type Target = Doc<'static, BoxDoc<'static, ShellAnnotation>, ShellAnnotation>
The resulting type after dereferencing.
fn deref(&self) -> &Self::Target
[src]
impl Eq for DebugDoc
[src]
impl From<DebugDoc> for Doc<'static, BoxDoc<'static, ShellAnnotation>, ShellAnnotation>
[src]
fn from(
input: DebugDoc
) -> Doc<'static, BoxDoc<'static, ShellAnnotation>, ShellAnnotation>
[src]
input: DebugDoc
) -> Doc<'static, BoxDoc<'static, ShellAnnotation>, ShellAnnotation>
impl Hash for DebugDoc
[src]
fn hash<H: Hasher>(&self, state: &mut H)
[src]
pub fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl Ord for DebugDoc
[src]
fn cmp(&self, other: &DebugDoc) -> Ordering
[src]
#[must_use]pub fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn clamp(self, min: Self, max: Self) -> Self
1.50.0[src]
impl PartialEq<DebugDoc> for DebugDoc
[src]
impl PartialOrd<DebugDoc> for DebugDoc
[src]
fn partial_cmp(&self, other: &DebugDoc) -> Option<Ordering>
[src]
fn lt(&self, other: &DebugDoc) -> bool
[src]
fn le(&self, other: &DebugDoc) -> bool
[src]
fn gt(&self, other: &DebugDoc) -> bool
[src]
fn ge(&self, other: &DebugDoc) -> bool
[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 plain_string(&self, width: usize) -> String
[src]
fn colored_string(&self, width: usize) -> String
[src]
impl StructuralEq for DebugDoc
[src]
impl StructuralPartialEq for DebugDoc
[src]
Auto Trait Implementations
impl RefUnwindSafe for DebugDoc
[src]
impl Send for DebugDoc
[src]
impl Sync for DebugDoc
[src]
impl Unpin for DebugDoc
[src]
impl UnwindSafe for DebugDoc
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,