pub struct DomRange {
pub start: NodeId,
pub end: NodeId,
}
Fields§
§start: NodeId
§end: NodeId
Implementations§
Source§impl DomRange
impl DomRange
Sourcepub fn contains(&self, other: &Self) -> bool
pub fn contains(&self, other: &Self) -> bool
Is other
a subtree of self
? - Assumes that the DOM was
constructed in a linear order, i.e. the child being within
the parents start / end bounds
Sourcepub fn equals_range(&self, other: &Self) -> bool
pub fn equals_range(&self, other: &Self) -> bool
Compares two DOM ranges without looking at the DOM hashes (not equivalent to ==
)
Trait Implementations§
Source§impl Ord for DomRange
impl Ord for DomRange
Source§impl PartialOrd for DomRange
impl PartialOrd for DomRange
impl Copy for DomRange
impl Eq for DomRange
impl StructuralPartialEq for DomRange
Auto Trait Implementations§
impl Freeze for DomRange
impl RefUnwindSafe for DomRange
impl Send for DomRange
impl Sync for DomRange
impl Unpin for DomRange
impl UnwindSafe for DomRange
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)