Trait pretty::DocPtr

source ·
pub trait DocPtr<'a, A>: Deref<Target = Doc<'a, Self, A>> + Sized
where A: 'a,
{ type ColumnFn: Deref<Target = dyn Fn(usize) -> Self + 'a> + Clone + 'a; type WidthFn: Deref<Target = dyn Fn(isize) -> Self + 'a> + Clone + 'a; }

Required Associated Types§

source

type ColumnFn: Deref<Target = dyn Fn(usize) -> Self + 'a> + Clone + 'a

source

type WidthFn: Deref<Target = dyn Fn(isize) -> Self + 'a> + Clone + 'a

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<'a, A> DocPtr<'a, A> for BoxDoc<'a, A>

§

type ColumnFn = Rc<dyn Fn(usize) -> BoxDoc<'a, A> + 'a>

§

type WidthFn = Rc<dyn Fn(isize) -> BoxDoc<'a, A> + 'a>

source§

impl<'a, A> DocPtr<'a, A> for RcDoc<'a, A>

§

type ColumnFn = Rc<dyn Fn(usize) -> RcDoc<'a, A> + 'a>

§

type WidthFn = Rc<dyn Fn(isize) -> RcDoc<'a, A> + 'a>

source§

impl<'a, A> DocPtr<'a, A> for RefDoc<'a, A>

§

type ColumnFn = &'a dyn Fn(usize) -> RefDoc<'a, A>

§

type WidthFn = &'a dyn Fn(isize) -> RefDoc<'a, A>