pub struct RefDoc<'a, A: 'a>(/* private fields */);
Expand description
Newtype wrapper for &Doc
Methods from Deref<Target = Doc<'a, RefDoc<'a, A>, A>>§
Sourcepub fn render<'b, W>(&'b self, width: usize, out: &mut W) -> Result<()>
pub fn render<'b, W>(&'b self, width: usize, out: &mut W) -> Result<()>
Writes a rendered document to a std::io::Write
object.
Sourcepub fn render_fmt<'b, W>(&'b self, width: usize, out: &mut W) -> Result
pub fn render_fmt<'b, W>(&'b self, width: usize, out: &mut W) -> Result
Writes a rendered document to a std::fmt::Write
object.
Sourcepub fn render_raw<'b, W>(
&'b self,
width: usize,
out: &mut W,
) -> Result<(), W::Error>
pub fn render_raw<'b, W>( &'b self, width: usize, out: &mut W, ) -> Result<(), W::Error>
Writes a rendered document to a RenderAnnotated<A>
object.
Trait Implementations§
Source§impl<'a, A: Ord + 'a> Ord for RefDoc<'a, A>
impl<'a, A: Ord + 'a> Ord for RefDoc<'a, A>
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl<'a, A: PartialOrd + 'a> PartialOrd for RefDoc<'a, A>
impl<'a, A: PartialOrd + 'a> PartialOrd for RefDoc<'a, A>
impl<'a, A: Eq + 'a> Eq for RefDoc<'a, A>
impl<'a, A: 'a> StructuralPartialEq for RefDoc<'a, A>
Auto Trait Implementations§
impl<'a, A> Freeze for RefDoc<'a, A>
impl<'a, A> RefUnwindSafe for RefDoc<'a, A>where
A: RefUnwindSafe,
impl<'a, A> Send for RefDoc<'a, A>where
A: Sync,
impl<'a, A> Sync for RefDoc<'a, A>where
A: Sync,
impl<'a, A> Unpin for RefDoc<'a, A>
impl<'a, A> UnwindSafe for RefDoc<'a, A>where
A: RefUnwindSafe,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)