pub struct Point {
pub key: NodeKey,
pub offset: usize,
pub point_type: PointType,
}Expand description
PointType: a node key, an offset and a type.
Fields§
§key: NodeKey§offset: usize§point_type: PointTypeImplementations§
Source§impl Point
impl Point
pub fn new( key: impl Into<NodeKey>, offset: usize, point_type: PointType, ) -> Self
Sourcepub fn is_before(&self, b: &Point) -> Result<bool, LexicalError>
pub fn is_before(&self, b: &Point) -> Result<bool, LexicalError>
point.isBefore(b): whether this point comes before b in the
document.
Sourcepub fn get_node(&self) -> Result<NodeRef, LexicalError>
pub fn get_node(&self) -> Result<NodeRef, LexicalError>
point.getNode().
Trait Implementations§
impl Eq for Point
impl StructuralPartialEq for Point
Auto Trait Implementations§
impl Forget for Point
impl Freeze for Point
impl Move for Point
impl RefUnwindSafe for Point
impl Send for Point
impl Sync for Point
impl Unpin for Point
impl UnsafeUnpin for Point
impl UnwindSafe for Point
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