pretty

Trait 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

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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