Trait radicle_cli::git::pretty_diff::ToPretty

source ·
pub trait ToPretty {
    type Output: Element;
    type Context;

    // Required method
    fn pretty<R: Repo>(
        &self,
        hi: &mut Highlighter,
        context: &Self::Context,
        repo: &R,
    ) -> Self::Output;
}
Expand description

Types that can be rendered as pretty diffs.

Required Associated Types§

source

type Output: Element

The output of the render process.

source

type Context

Context that can be passed down from parent objects during rendering.

Required Methods§

source

fn pretty<R: Repo>( &self, hi: &mut Highlighter, context: &Self::Context, repo: &R, ) -> Self::Output

Render to pretty diff output.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl ToPretty for DiffContent

§

type Output = VStack<'static>

§

type Context = FileDiff

source§

fn pretty<R: Repo>( &self, hi: &mut Highlighter, context: &Self::Context, repo: &R, ) -> Self::Output

source§

impl ToPretty for FileDiff

§

type Output = VStack<'static>

§

type Context = ()

source§

fn pretty<R: Repo>( &self, hi: &mut Highlighter, _context: &Self::Context, repo: &R, ) -> Self::Output

source§

impl ToPretty for Modification

§

type Output = Line

§

type Context = Blobs

source§

fn pretty<R: Repo>( &self, _hi: &mut Highlighter, blobs: &Blobs, _repo: &R, ) -> Self::Output

source§

impl ToPretty for Diff

§

type Output = VStack<'static>

§

type Context = ()

source§

fn pretty<R: Repo>( &self, hi: &mut Highlighter, context: &Self::Context, repo: &R, ) -> Self::Output

source§

impl ToPretty for Hunk<Modification>

§

type Output = VStack<'static>

§

type Context = Blobs

source§

fn pretty<R: Repo>( &self, hi: &mut Highlighter, blobs: &Blobs, repo: &R, ) -> Self::Output

Implementors§