pub struct Tag {
pub name: String,
pub url: Url,
}
Expand description
Represents a crate::post::Post
tag. On parsing a post from YAML, only
the name
field is parsed while the url
field is left empty. The URL
field must be filled in later based on the index_base_url
and the tag
name.
The tag’s name. This should be slugified so e.g., macOS
and MacOS
resolve to the same value, and also so the field can be dropped into a
Url
.
The URL for the tag’s first index page. Given an index_base_url
,
this should look something like
{index_base_url}/{tag_name}/index.html
.
Performs copy-assignment from
source
.
Read more
Formats the value using the given formatter.
Read more
Converts Tag
s into Value
s for templating.
Implements Hash
for Tag
by delegating directly to the name
field.
Implements PartialEq
and Eq
for Tag
by delegating directly
to the name
field.
This method tests for !=
. The default implementation is almost always
sufficient, and should not be overridden without very good reason.
Immutably borrows from an owned value.
Read more
Mutably borrows from an owned value.
Read more
Returns the argument unchanged.
Calls U::from(self)
.
That is, this conversion is whatever the implementation of
From<T> for U
chooses to do.
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning.
Read more
Uses borrowed data to replace owned data, usually by cloning.
Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.