[−][src]Struct pretty::BoxDoc
Methods from Deref<Target = Doc<'a, BoxDoc<'a, A>, A>>
pub fn render<'b, W: ?Sized>(&'b self, width: usize, out: &mut W) -> Result<()> where
T: Deref<Target = Doc<'b, T, A>>,
W: Write,
[src]
T: Deref<Target = Doc<'b, T, A>>,
W: Write,
Writes a rendered document to a std::io::Write
object.
pub fn render_fmt<'b, W: ?Sized>(&'b self, width: usize, out: &mut W) -> Result where
T: Deref<Target = Doc<'b, T, A>>,
W: Write,
[src]
T: Deref<Target = Doc<'b, T, A>>,
W: Write,
Writes a rendered document to a std::fmt::Write
object.
pub fn render_raw<'b, W: ?Sized>(
&'b self,
width: usize,
out: &mut W
) -> Result<(), W::Error> where
T: Deref<Target = Doc<'b, T, A>>,
W: RenderAnnotated<A>,
[src]
&'b self,
width: usize,
out: &mut W
) -> Result<(), W::Error> where
T: Deref<Target = Doc<'b, T, A>>,
W: RenderAnnotated<A>,
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");
pub fn render_colored<'b, W>(&'b self, width: usize, out: W) -> Result<()> where
T: Deref<Target = Doc<'b, T, ColorSpec>>,
W: WriteColor,
[src]
T: Deref<Target = Doc<'b, T, ColorSpec>>,
W: WriteColor,
Trait Implementations
impl<'a, A: Clone> Clone for BoxDoc<'a, A>
[src]
impl<'a, A: Eq> Eq for BoxDoc<'a, A>
[src]
impl<'a, A: Ord> Ord for BoxDoc<'a, A>
[src]
fn cmp(&self, other: &BoxDoc<'a, A>) -> Ordering
[src]
fn max(self, other: Self) -> Self
1.21.0[src]
fn min(self, other: Self) -> Self
1.21.0[src]
fn clamp(self, min: Self, max: Self) -> Self
[src]
impl<'a, A: PartialEq> PartialEq<BoxDoc<'a, A>> for BoxDoc<'a, A>
[src]
impl<'a, A: PartialOrd> PartialOrd<BoxDoc<'a, A>> for BoxDoc<'a, A>
[src]
fn partial_cmp(&self, other: &BoxDoc<'a, A>) -> Option<Ordering>
[src]
fn lt(&self, other: &BoxDoc<'a, A>) -> bool
[src]
fn le(&self, other: &BoxDoc<'a, A>) -> bool
[src]
fn gt(&self, other: &BoxDoc<'a, A>) -> bool
[src]
fn ge(&self, other: &BoxDoc<'a, A>) -> bool
[src]
impl<'a, A> Debug for BoxDoc<'a, A> where
A: Debug,
[src]
A: Debug,
impl<'a, A> Deref for BoxDoc<'a, A>
[src]
type Target = Doc<'a, BoxDoc<'a, A>, A>
The resulting type after dereferencing.
fn deref(&self) -> &Self::Target
[src]
impl<'a, A> StructuralPartialEq for BoxDoc<'a, A>
[src]
impl<'a, A> StructuralEq for BoxDoc<'a, A>
[src]
Auto Trait Implementations
impl<'a, A> Send for BoxDoc<'a, A> where
A: Send,
A: Send,
impl<'a, A> Sync for BoxDoc<'a, A> where
A: Sync,
A: Sync,
impl<'a, A> Unpin for BoxDoc<'a, A>
impl<'a, A> UnwindSafe for BoxDoc<'a, A> where
A: UnwindSafe,
A: UnwindSafe,
impl<'a, A> RefUnwindSafe for BoxDoc<'a, A> where
A: RefUnwindSafe,
A: RefUnwindSafe,
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
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.
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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,