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

source§

type Output = VStack<'static>

source§

type Context = Blobs<(PathBuf, Blob)>

source§

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

source§

impl ToPretty for FileDiff

source§

type Output = VStack<'static>

source§

type Context = ()

source§

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

source§

impl ToPretty for Modification

source§

type Output = Line

source§

type Context = Blobs<Vec<Line>>

source§

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

source§

impl ToPretty for Added

source§

type Output = VStack<'static>

source§

type Context = FileHeader

source§

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

source§

impl ToPretty for Copied

source§

type Output = VStack<'static>

source§

type Context = FileHeader

source§

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

source§

impl ToPretty for Deleted

source§

type Output = VStack<'static>

source§

type Context = FileHeader

source§

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

source§

impl ToPretty for Diff

source§

type Output = VStack<'static>

source§

type Context = ()

source§

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

source§

impl ToPretty for Hunk<Modification>

source§

type Output = VStack<'static>

source§

type Context = Blobs<Vec<Line>>

source§

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

source§

impl ToPretty for Modified

source§

type Output = VStack<'static>

source§

type Context = FileHeader

source§

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

source§

impl ToPretty for Moved

source§

type Output = VStack<'static>

source§

type Context = FileHeader

source§

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

Implementors§