pub struct PageRef {
pub title: String,
pub url: String,
pub description: Option<String>,
pub date: Option<String>,
pub banner: Option<String>,
}Expand description
One page as a taxonomy lists it.
This was a (title, url) pair, which is all a bulleted list needs. A
card needs more — a date to sort and show, a description to read, an
image to look at — and none of it can be recovered at render time,
because the sidecar that held it has already been walked past. The
fields beyond title and url are all optional: a page that
declares none still lists, exactly as it did before.
Fields§
§title: StringDisplay title.
url: StringResolved, prefix-aware URL.
description: Option<String>Front-matter description, for the card body and JSON-LD.
date: Option<String>Front-matter date, as authored.
Front-matter banner, the card’s image.
Implementations§
Source§impl PageRef
impl PageRef
Sourcepub fn new(title: impl Into<String>, url: impl Into<String>) -> Self
pub fn new(title: impl Into<String>, url: impl Into<String>) -> Self
A page with nothing but a title and a URL — what every taxonomy carried before cards existed.
The collector fills every field from the sidecar; this is for
callers building a TaxonomyTerm by hand, where the card fields
are not available and are not wanted.
Trait Implementations§
impl Eq for PageRef
impl StructuralPartialEq for PageRef
Auto Trait Implementations§
impl Freeze for PageRef
impl RefUnwindSafe for PageRef
impl Send for PageRef
impl Sync for PageRef
impl Unpin for PageRef
impl UnsafeUnpin for PageRef
impl UnwindSafe for PageRef
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more