Trait diff_match_patch_rs::traits::DType
source · pub trait DType:
Copy
+ Ord
+ Eq
+ Hash {
// Required methods
fn bisect_split(
dmp: &DiffMatchPatch,
old: &[Self],
new: &[Self],
x: usize,
y: usize,
deadline: Option<Instant>,
) -> Result<Vec<Diff<Self>>, Error>;
fn from_char(c: char) -> Self;
fn as_char(&self) -> Option<char>;
fn from_str(str: &str) -> Vec<Self>;
fn to_string(data: &[Self]) -> Result<String, Error>;
fn is_linebreak_end(input: &[Self]) -> bool;
fn is_linebreak_start(input: &[Self]) -> bool;
fn percent_encode(input: &[Self]) -> Vec<Self>;
fn percent_decode(input: &[Self]) -> Vec<Self>;
// Provided method
fn humanize(_diffs: &mut Vec<Diff<Self>>) -> Result<(), Error> { ... }
}
Required Methods§
fn bisect_split( dmp: &DiffMatchPatch, old: &[Self], new: &[Self], x: usize, y: usize, deadline: Option<Instant>, ) -> Result<Vec<Diff<Self>>, Error>
fn from_char(c: char) -> Self
fn as_char(&self) -> Option<char>
fn from_str(str: &str) -> Vec<Self>
fn to_string(data: &[Self]) -> Result<String, Error>
fn is_linebreak_end(input: &[Self]) -> bool
fn is_linebreak_start(input: &[Self]) -> bool
fn percent_encode(input: &[Self]) -> Vec<Self>
fn percent_decode(input: &[Self]) -> Vec<Self>
Provided Methods§
Object Safety§
This trait is not object safe.