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.
Fields
name: String
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
crate::url::UrlBuf
.
url: UrlBuf
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
.
Trait Implementations
sourceimpl<'de> Deserialize<'de> for Tag
impl<'de> Deserialize<'de> for Tag
sourcefn deserialize<D>(deserializer: D) -> Result<Tag, D::Error> where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Tag, D::Error> where
D: Deserializer<'de>,
Implements serde::de::Deserialize
for Tag
. This expects a string
and will deserialize it into a Tag
whose name
is the sluggified
input string and whose url
field is left empty.
impl Eq for Tag
Auto Trait Implementations
impl RefUnwindSafe for Tag
impl Send for Tag
impl Sync for Tag
impl Unpin for Tag
impl UnwindSafe for Tag
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more