[−][src]Struct beediff::diff::text::TextParser
Using the LCS algorithm to compare text files (like linux diff). #Examples
How to compare two files with locations fpath_a and fpath_b:
let mut text_parser = diff::text::parser(fpath_a, fpath_b).unwrap(); text_parser.run(beediff::Sensivity::CaseSensitive); text_parser.print_same(); text_parser.print_others();
Implementations
impl TextParser
[src]
pub fn run(&mut self, sensitivity: Sensivity)
[src]
Starts LCS parsing for two files contents.
Returns tuple of two vectors.
The first vector contains information (Tokens) about the same lines.
The second one contains information about the remaining lines,
not the same lines (Added, Changed, Deleted).
pub fn same(&self) -> Option<Vec<Token>>
[src]
Returns copy of vector with 'Tokens' described the same lines.
pub fn others(&self) -> Option<Vec<Token>>
[src]
Returns copy of vector with 'Tokens' described not the same lines.
pub fn print_same(&self)
[src]
Prints information about the same lines.
pub fn print_others(&self)
[src]
Prints information about the same lines.
pub fn print_unix_diff(&self)
[src]
Auto Trait Implementations
impl RefUnwindSafe for TextParser
impl Send for TextParser
impl Sync for TextParser
impl Unpin for TextParser
impl UnwindSafe for TextParser
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,