pub struct MetaTagGroups {
pub apple: String,
pub primary: String,
pub og: String,
pub ms: String,
pub twitter: String,
}
Expand description
Holds collections of meta tags for different platforms and categories.
Fields§
§apple: String
The apple
meta tags.
primary: String
The primary meta tags.
og: String
The og
meta tags.
ms: String
The ms
meta tags.
twitter: String
The twitter
meta tags.
Implementations§
Source§impl MetaTagGroups
impl MetaTagGroups
Sourcepub fn add_custom_tag(&mut self, name: &str, content: &str)
pub fn add_custom_tag(&mut self, name: &str, content: &str)
Adds a custom meta tag to the appropriate group.
§Arguments
name
- The name of the meta tag.content
- The content of the meta tag.
Sourcepub fn format_meta_tag(&self, name: &str, content: &str) -> String
pub fn format_meta_tag(&self, name: &str, content: &str) -> String
Generates meta tags for Apple devices.
§Arguments
metadata
- A reference to a HashMap containing the metadata.
Generates primary meta tags like author
, description
, and keywords
.
§Arguments
metadata
- A reference to a HashMap containing the metadata.
Generates Open Graph (og
) meta tags for social media.
§Arguments
metadata
- A reference to a HashMap containing the metadata.
Generates Microsoft-specific meta tags.
§Arguments
metadata
- A reference to a HashMap containing the metadata.
Generates Twitter meta tags for embedding rich media in tweets.
§Arguments
metadata
- A reference to a HashMap containing the metadata.
Trait Implementations§
Source§impl Clone for MetaTagGroups
impl Clone for MetaTagGroups
Source§fn clone(&self) -> MetaTagGroups
fn clone(&self) -> MetaTagGroups
Returns a copy of the value. Read more
1.0.0 · 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 MetaTagGroups
impl Debug for MetaTagGroups
Source§impl Default for MetaTagGroups
impl Default for MetaTagGroups
Source§fn default() -> MetaTagGroups
fn default() -> MetaTagGroups
Returns the “default value” for a type. Read more
Source§impl Display for MetaTagGroups
Implement Display
for MetaTagGroups
.
impl Display for MetaTagGroups
Implement Display
for MetaTagGroups
.
Source§impl Hash for MetaTagGroups
impl Hash for MetaTagGroups
Source§impl PartialEq for MetaTagGroups
impl PartialEq for MetaTagGroups
impl Eq for MetaTagGroups
impl StructuralPartialEq for MetaTagGroups
Auto Trait Implementations§
impl Freeze for MetaTagGroups
impl RefUnwindSafe for MetaTagGroups
impl Send for MetaTagGroups
impl Sync for MetaTagGroups
impl Unpin for MetaTagGroups
impl UnwindSafe for MetaTagGroups
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.