pub struct TypedRef {
pub kind: String,
pub slug: String,
pub alias: Option<String>,
}Expand description
A typed reference, [[type/slug]] or [[type/slug|Alias]]: a
frontmatter value naming one note of a known type, such as
location: "[[location/home]]".
§Examples
use markdown_link::parse_typed_ref;
let typed = parse_typed_ref("[[location/home|Home]]").unwrap();
assert_eq!(typed.kind, "location");
assert_eq!(typed.slug, "home");
assert_eq!(typed.alias.as_deref(), Some("Home"));Fields§
§kind: StringThe text before the first /, such as location.
slug: StringThe rest of the target, such as home or 2026/spring.
alias: Option<String>The text after the first |, as written.
Trait Implementations§
impl Eq for TypedRef
impl StructuralPartialEq for TypedRef
Auto Trait Implementations§
impl Freeze for TypedRef
impl RefUnwindSafe for TypedRef
impl Send for TypedRef
impl Sync for TypedRef
impl Unpin for TypedRef
impl UnsafeUnpin for TypedRef
impl UnwindSafe for TypedRef
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