pub struct DiffResult { /* private fields */ }Expand description
Result of computing a line-based diff between two texts.
Implementations§
Source§impl DiffResult
impl DiffResult
Sourcepub fn added_lines(&self) -> u32
pub fn added_lines(&self) -> u32
Number of lines added in the new text.
Sourcepub fn removed_lines(&self) -> u32
pub fn removed_lines(&self) -> u32
Number of lines removed from the old text.
Sourcepub fn added_tokens(&self) -> u32
pub fn added_tokens(&self) -> u32
Estimated tokens added.
Sourcepub fn removed_tokens(&self) -> u32
pub fn removed_tokens(&self) -> u32
Estimated tokens removed.
Trait Implementations§
Source§impl Clone for DiffResult
impl Clone for DiffResult
Source§fn clone(&self) -> DiffResult
fn clone(&self) -> DiffResult
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DiffResult
impl Debug for DiffResult
Source§impl From<DiffResult> for JsValue
impl From<DiffResult> for JsValue
Source§fn from(value: DiffResult) -> Self
fn from(value: DiffResult) -> Self
Converts to this type from the input type.
Source§impl FromWasmAbi for DiffResult
impl FromWasmAbi for DiffResult
Source§impl IntoWasmAbi for DiffResult
impl IntoWasmAbi for DiffResult
Source§impl LongRefFromWasmAbi for DiffResult
impl LongRefFromWasmAbi for DiffResult
Source§impl OptionFromWasmAbi for DiffResult
impl OptionFromWasmAbi for DiffResult
Source§impl OptionIntoWasmAbi for DiffResult
impl OptionIntoWasmAbi for DiffResult
Source§impl RefFromWasmAbi for DiffResult
impl RefFromWasmAbi for DiffResult
Source§type Anchor = RcRef<DiffResult>
type Anchor = RcRef<DiffResult>
The type that holds the reference to
Self for the duration of the
invocation of the function that has an &Self parameter. This is
required to ensure that the lifetimes don’t persist beyond one function
call, and so that they remain anonymous.Source§impl RefMutFromWasmAbi for DiffResult
impl RefMutFromWasmAbi for DiffResult
Source§impl TryFromJsValue for DiffResult
impl TryFromJsValue for DiffResult
Source§impl VectorFromWasmAbi for DiffResult
impl VectorFromWasmAbi for DiffResult
type Abi = <Box<[JsValue]> as FromWasmAbi>::Abi
unsafe fn vector_from_abi(js: Self::Abi) -> Box<[DiffResult]>
Source§impl VectorIntoWasmAbi for DiffResult
impl VectorIntoWasmAbi for DiffResult
type Abi = <Box<[JsValue]> as IntoWasmAbi>::Abi
fn vector_into_abi(vector: Box<[DiffResult]>) -> Self::Abi
Source§impl WasmDescribeVector for DiffResult
impl WasmDescribeVector for DiffResult
impl SupportsConstructor for DiffResult
impl SupportsInstanceProperty for DiffResult
impl SupportsStaticProperty for DiffResult
Auto Trait Implementations§
impl Freeze for DiffResult
impl RefUnwindSafe for DiffResult
impl Send for DiffResult
impl Sync for DiffResult
impl Unpin for DiffResult
impl UnsafeUnpin for DiffResult
impl UnwindSafe for DiffResult
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
Source§type Abi = <T as IntoWasmAbi>::Abi
type Abi = <T as IntoWasmAbi>::Abi
Same as
IntoWasmAbi::AbiSource§fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
Same as
IntoWasmAbi::into_abi, except that it may throw and never
return in the case of Err.