Struct futhorc::tag::Tag[][src]

pub struct Tag {
    pub name: String,
    pub url: UrlBuf,
}

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

impl Clone for Tag[src]

impl Debug for Tag[src]

impl<'de> Deserialize<'de> for Tag[src]

fn deserialize<D>(deserializer: D) -> Result<Tag, D::Error> where
    D: Deserializer<'de>, 
[src]

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[src]

impl Hash for Tag[src]

fn hash<H: Hasher>(&self, state: &mut H)[src]

Implements Hash for Tag by delegating directly to the name field.

impl PartialEq<Tag> for Tag[src]

fn eq(&self, other: &Self) -> bool[src]

Implements PartialEq and Eq for Tag by delegating directly to the name field.

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

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.