pub struct LinkExtent {
pub start: usize,
pub end: usize,
pub href: String,
pub text: String,
}Expand description
One hyperlink’s full reach, in the document’s addressable character space.
start/end are document-relative — the same space TextCursor::position,
select_range and find_all matches use — so a caller can select the
extent without converting anything.
Fields§
§start: usize[start, end) in the document’s addressable character space.
end: usize§href: StringThe link’s destination.
text: StringThe text the link covers — what a writer sees as the link’s name.
Trait Implementations§
Source§impl Clone for LinkExtent
impl Clone for LinkExtent
Source§fn clone(&self) -> LinkExtent
fn clone(&self) -> LinkExtent
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 LinkExtent
impl Debug for LinkExtent
impl Eq for LinkExtent
Source§impl PartialEq for LinkExtent
impl PartialEq for LinkExtent
impl StructuralPartialEq for LinkExtent
Auto Trait Implementations§
impl Freeze for LinkExtent
impl RefUnwindSafe for LinkExtent
impl Send for LinkExtent
impl Sync for LinkExtent
impl Unpin for LinkExtent
impl UnsafeUnpin for LinkExtent
impl UnwindSafe for LinkExtent
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.