Trait radicle_cli::git::unified_diff::Encode

source ·
pub trait Encode: Sized {
    // Required method
    fn encode(&self, w: &mut Writer<'_>) -> Result<(), Error>;

    // Provided method
    fn to_unified_string(&self) -> Result<String, Error> { ... }
}
Expand description

Diff-related types that can be encoded intro the unified diff format.

Required Methods§

source

fn encode(&self, w: &mut Writer<'_>) -> Result<(), Error>

Encode type into diff writer.

Provided Methods§

source

fn to_unified_string(&self) -> Result<String, Error>

Encode into unified diff string.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl Encode for DiffContent

source§

fn encode(&self, w: &mut Writer<'_>) -> Result<(), Error>

source§

impl Encode for FileDiff

source§

fn encode(&self, w: &mut Writer<'_>) -> Result<(), Error>

source§

impl Encode for Modification

source§

fn encode(&self, w: &mut Writer<'_>) -> Result<(), Error>

source§

impl Encode for Diff

source§

fn encode(&self, w: &mut Writer<'_>) -> Result<(), Error>

source§

impl Encode for Hunk<DiffModification>

source§

fn encode(&self, w: &mut Writer<'_>) -> Result<(), Error>

source§

impl Encode for Hunk<Modification>

source§

fn encode(&self, w: &mut Writer<'_>) -> Result<(), Error>

Implementors§