pub struct UnfurlConfig {
pub title: Option<String>,
pub description: Option<String>,
pub image: Option<String>,
pub og_type: Option<UnfurlOgType>,
pub site_name: Option<String>,
}Expand description
Configuration for link unfurl (Open Graph) metadata Controls how the invitation link appears when shared on social platforms or messaging apps
Fields§
§title: Option<String>The title shown in link previews (og:title)
description: Option<String>The description shown in link previews (og:description)
image: Option<String>The image URL shown in link previews (og:image) - must be HTTPS
og_type: Option<UnfurlOgType>The Open Graph type (og:type)
site_name: Option<String>The site name shown in link previews (og:site_name)
Implementations§
Source§impl UnfurlConfig
impl UnfurlConfig
pub fn new() -> Self
pub fn with_title(self, title: &str) -> Self
pub fn with_description(self, description: &str) -> Self
pub fn with_image(self, image: &str) -> Self
pub fn with_type(self, og_type: UnfurlOgType) -> Self
pub fn with_site_name(self, site_name: &str) -> Self
Trait Implementations§
Source§impl Clone for UnfurlConfig
impl Clone for UnfurlConfig
Source§fn clone(&self) -> UnfurlConfig
fn clone(&self) -> UnfurlConfig
Returns a duplicate 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 UnfurlConfig
impl Debug for UnfurlConfig
Source§impl Default for UnfurlConfig
impl Default for UnfurlConfig
Source§fn default() -> UnfurlConfig
fn default() -> UnfurlConfig
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for UnfurlConfig
impl<'de> Deserialize<'de> for UnfurlConfig
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 UnfurlConfig
impl RefUnwindSafe for UnfurlConfig
impl Send for UnfurlConfig
impl Sync for UnfurlConfig
impl Unpin for UnfurlConfig
impl UnwindSafe for UnfurlConfig
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