pub struct Anchors { /* private fields */ }Expand description
What the links in one book can reach: each source, the headings in it, and every id a source writes.
Implementations§
Source§impl Anchors
impl Anchors
Sourcepub fn resolve(&self, url: &str, from: Option<&str>) -> LinkTarget
pub fn resolve(&self, url: &str, from: Option<&str>) -> LinkTarget
The node a link to url reaches, where the link is written in
the source named from.
The part of url before # names a source. It matches a
source name with no regard to case, with or without .md, and
with percent escapes decoded. A path that starts with ./ or
../ is relative to the folder of from. Any other path
matches the end of a source name, and a source in the folder of
from comes first. A link with no source part names from.
The part after # names a node in that source: an id the
source writes, the slug of a heading, or the text of a heading.
Text matches with no regard to case or punctuation, and the
first heading that matches wins. #Part#Notes names a heading
Notes under a heading Part. A link with no source part also
reaches an id that any source writes.
A link with no # part reaches the first section of the source.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Anchors
impl RefUnwindSafe for Anchors
impl Send for Anchors
impl Sync for Anchors
impl Unpin for Anchors
impl UnsafeUnpin for Anchors
impl UnwindSafe for Anchors
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> ErasedDestructor for Twhere
T: 'static,
§impl<U, T> ToOwnedObj<U> for Twhere
U: FromObjRef<T>,
impl<U, T> ToOwnedObj<U> for Twhere
U: FromObjRef<T>,
§fn to_owned_obj(&self, data: FontData<'_>) -> U
fn to_owned_obj(&self, data: FontData<'_>) -> U
T, using the provided data to resolve any offsets.