Struct futhorc::tag::Tag [−][src]
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]
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
[src]
impl Hash for Tag
[src]
fn hash<H: Hasher>(&self, state: &mut H)
[src]
pub fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl PartialEq<Tag> for Tag
[src]
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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,