pub struct WikiLink {
pub target: String,
pub heading: Option<String>,
pub block: Option<String>,
pub alias: Option<String>,
pub size: Option<Size>,
pub embed: bool,
}Expand description
A parsed [[target#heading|alias]].
Fields§
§target: StringThe link target, trimmed, minus any #heading, #^block and |alias.
heading: Option<String>The text after the first # in the target part, trimmed, unless it
starts with ^, which makes it a WikiLink::block. A heading path
such as Parent#Child keeps its inner #.
block: Option<String>A block reference, Note#^id: the text after #^, trimmed.
alias: Option<String>The text after the first |, trimmed. An embed’s size (|300) stays
in it as written; WikiLink::size reads it.
size: Option<Size>An embed’s |300 or |300x200: the last | part of its alias, when
that is a size. None for a link that is not an embed.
embed: boolWhether the link was written as an embed, ![[...]].
Trait Implementations§
impl Eq for WikiLink
impl StructuralPartialEq for WikiLink
Auto Trait Implementations§
impl Freeze for WikiLink
impl RefUnwindSafe for WikiLink
impl Send for WikiLink
impl Sync for WikiLink
impl Unpin for WikiLink
impl UnsafeUnpin for WikiLink
impl UnwindSafe for WikiLink
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