Implement Metadata + HTTPEquiv types for meta elements.
This commit is contained in:
parent
5a72616f97
commit
2c53d5d2ca
|
@ -53,8 +53,8 @@ declare_elements!{
|
||||||
meta {
|
meta {
|
||||||
charset: String, // FIXME IANA standard names
|
charset: String, // FIXME IANA standard names
|
||||||
content: String,
|
content: String,
|
||||||
http_equiv: String, // FIXME string enum
|
http_equiv: HTTPEquiv,
|
||||||
name: String, // FIXME string enum
|
name: Metadata,
|
||||||
} in [MetadataContent];
|
} in [MetadataContent];
|
||||||
style {
|
style {
|
||||||
type: Mime,
|
type: Mime,
|
||||||
|
|
|
@ -84,6 +84,14 @@ pub enum FormMethod {
|
||||||
Get,
|
Get,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[derive(EnumString, Display, PartialEq, Eq, PartialOrd, Ord, AsRefStr, AsStaticStr)]
|
||||||
|
pub enum HTTPEquiv {
|
||||||
|
#[strum(to_string = "content-security-policy")]
|
||||||
|
ContentSecurityPolicy,
|
||||||
|
#[strum(to_string = "refresh")]
|
||||||
|
Refresh,
|
||||||
|
}
|
||||||
|
|
||||||
#[derive(EnumString, Display, PartialEq, Eq, PartialOrd, Ord, AsRefStr, AsStaticStr)]
|
#[derive(EnumString, Display, PartialEq, Eq, PartialOrd, Ord, AsRefStr, AsStaticStr)]
|
||||||
pub enum ImageDecoding {
|
pub enum ImageDecoding {
|
||||||
#[strum(to_string = "sync")]
|
#[strum(to_string = "sync")]
|
||||||
|
@ -190,6 +198,32 @@ pub enum LinkType {
|
||||||
Tag,
|
Tag,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[derive(EnumString, Display, PartialEq, Eq, PartialOrd, Ord, AsRefStr, AsStaticStr)]
|
||||||
|
pub enum Metadata {
|
||||||
|
#[strum(to_string = "application-name")]
|
||||||
|
ApplicationName,
|
||||||
|
#[strum(to_string = "author")]
|
||||||
|
Author,
|
||||||
|
#[strum(to_string = "description")]
|
||||||
|
Description,
|
||||||
|
#[strum(to_string = "generator")]
|
||||||
|
Generator,
|
||||||
|
#[strum(to_string = "keywords")]
|
||||||
|
Keywords,
|
||||||
|
#[strum(to_string = "referrer")]
|
||||||
|
Referrer,
|
||||||
|
#[strum(to_string = "creator")]
|
||||||
|
Creator,
|
||||||
|
#[strum(to_string = "googlebot")]
|
||||||
|
Googlebot,
|
||||||
|
#[strum(to_string = "publisher")]
|
||||||
|
Publisher,
|
||||||
|
#[strum(to_string = "robots")]
|
||||||
|
Robots,
|
||||||
|
#[strum(to_string = "viewport")]
|
||||||
|
Viewport,
|
||||||
|
}
|
||||||
|
|
||||||
#[derive(EnumString, Display, PartialEq, Eq, PartialOrd, Ord, AsRefStr, AsStaticStr)]
|
#[derive(EnumString, Display, PartialEq, Eq, PartialOrd, Ord, AsRefStr, AsStaticStr)]
|
||||||
pub enum OnOff {
|
pub enum OnOff {
|
||||||
#[strum(to_string = "on")]
|
#[strum(to_string = "on")]
|
||||||
|
|
Loading…
Reference in New Issue