pub struct PageMetadata { /* private fields */ }Expand description
Page metadata for external surfaces.
Implementations§
Source§impl PageMetadata
impl PageMetadata
Sourcepub const fn new(title: MetadataTitle, description: MetadataDescription) -> Self
pub const fn new(title: MetadataTitle, description: MetadataDescription) -> Self
Creates page metadata from a title and description.
Sourcepub fn with_canonical_url(self, url: impl Into<String>) -> Self
pub fn with_canonical_url(self, url: impl Into<String>) -> Self
Sets a canonical URL label.
Sourcepub fn with_robots(self, content: impl Into<String>) -> Self
pub fn with_robots(self, content: impl Into<String>) -> Self
Sets robots meta content.
Sets social preview metadata.
Sourcepub const fn title(&self) -> &MetadataTitle
pub const fn title(&self) -> &MetadataTitle
Returns the title.
Sourcepub const fn description(&self) -> &MetadataDescription
pub const fn description(&self) -> &MetadataDescription
Returns the description.
Sourcepub fn canonical_url(&self) -> Option<&str>
pub fn canonical_url(&self) -> Option<&str>
Returns the canonical URL label.
Returns social preview metadata.
Trait Implementations§
Source§impl Clone for PageMetadata
impl Clone for PageMetadata
Source§fn clone(&self) -> PageMetadata
fn clone(&self) -> PageMetadata
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PageMetadata
impl Debug for PageMetadata
Source§impl PartialEq for PageMetadata
impl PartialEq for PageMetadata
Source§fn eq(&self, other: &PageMetadata) -> bool
fn eq(&self, other: &PageMetadata) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for PageMetadata
impl StructuralPartialEq for PageMetadata
Auto Trait Implementations§
impl Freeze for PageMetadata
impl RefUnwindSafe for PageMetadata
impl Send for PageMetadata
impl Sync for PageMetadata
impl Unpin for PageMetadata
impl UnsafeUnpin for PageMetadata
impl UnwindSafe for PageMetadata
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