pub struct AmpInfo {
pub is_amp: bool,
pub amp_url: Option<String>,
pub canonical_url: Option<String>,
pub has_amp_runtime: bool,
pub amp_components: Vec<String>,
pub amp_version: Option<String>,
}Expand description
AMP 页面信息
存储从 HTML 文档中提取的 AMP 相关元数据。
Fields§
§is_amp: bool当前页面是否为 AMP 页面
amp_url: Option<String>AMP 版本的 URL(如果当前页面不是 AMP,这里有指向 AMP 版本的链接)
canonical_url: Option<String>标准版(canonical)URL
has_amp_runtime: bool是否加载了 AMP 运行时
amp_components: Vec<String>使用中的 AMP 扩展组件列表
amp_version: Option<String>AMP 版本号
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for AmpInfo
impl<'de> Deserialize<'de> for AmpInfo
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for AmpInfo
impl RefUnwindSafe for AmpInfo
impl Send for AmpInfo
impl Sync for AmpInfo
impl Unpin for AmpInfo
impl UnsafeUnpin for AmpInfo
impl UnwindSafe for AmpInfo
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more