pub enum Behavior {
Inclusive = 2,
Merge = 0,
Delete = 1,
}Variants§
Inclusive = 2
When calculating the final state, it will keep all the ranges even if they have the same type
For example, we would like to keep both comments alive even if they have overlapped regions
Merge = 0
When calculating the final state, it will merge the ranges that have overlapped regions and have the same type
For example, [bold 2~5] can be merged with [bold 1~4] to produce [bold 1-5]
Delete = 1
It will delete the overlapped range that has smaller lamport && has the same type.
But it will keep the Inclusive type unchanged
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Behavior
impl<'de> Deserialize<'de> for Behavior
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Ord for Behavior
impl Ord for Behavior
Source§impl PartialOrd for Behavior
impl PartialOrd for Behavior
impl Copy for Behavior
impl Eq for Behavior
impl StructuralPartialEq for Behavior
Auto Trait Implementations§
impl Freeze for Behavior
impl RefUnwindSafe for Behavior
impl Send for Behavior
impl Sync for Behavior
impl Unpin for Behavior
impl UnwindSafe for Behavior
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more