Keyboard shortcuts

Press or to navigate between chapters

Press ? to show this help

Press Esc to hide this help

diff

Fully qualified path: diff

Modules

diff
string
types

Free functions

linesComputes the diff between the lines of two strings.
charsComputes the diff between the chars of two strings.

Re-exports:


DiffResultA fragment of a computed diff.

Modules

Modules

diff
string
types

diff

Fully qualified path: diff::diff

Free functions

do_diff

Free functions

Free functions

do_diff

do_diff

Fully qualified path: diff::diff::do_diff

pub fn do_diff<T, +Copy<T>, +Drop<T>, +PartialEq<T>, +Debug<T>>(
    left: Span<T>, right: Span<T>,
) -> Array<DiffResult<T>>

string

Fully qualified path: diff::string

Free functions

Free functions

Free functions

split_chars

Fully qualified path: diff::string::split_chars

pub(crate) fn split_chars(string: @ByteArray) -> Array<u8>

split_lines

Fully qualified path: diff::string::split_lines

pub(crate) fn split_lines(text: @ByteArray) -> Array<@ByteArray>

types

Fully qualified path: diff::types

Enums

DiffResultA fragment of a computed diff.

Enums

Enums

DiffResultA fragment of a computed diff.

DiffResult

A fragment of a computed diff.

Fully qualified path: diff::types::DiffResult

pub enum DiffResult {
    Left: T,
    Both: (T, T),
    Right: T,
}

Variants

Left

An element that only exists in the left input.

Fully qualified path: diff::types::DiffResult::Left

Left: T

Both

Elements that exist in both inputs.

Fully qualified path: diff::types::DiffResult::Both

Both: (T, T)

An element that only exists in the right input.

Fully qualified path: diff::types::DiffResult::Right

Right: T

Free functions

Free functions

linesComputes the diff between the lines of two strings.
charsComputes the diff between the chars of two strings.

lines

Computes the diff between the lines of two strings.

Fully qualified path: diff::lines

pub fn lines(left: @ByteArray, right: @ByteArray) -> Array<DiffResult<@ByteArray>>

chars

Computes the diff between the chars of two strings.

Fully qualified path: diff::chars

pub fn chars(left: @ByteArray, right: @ByteArray) -> Array<DiffResult<u8>>