telers 1.0.0-beta.7

An asynchronous framework for Telegram Bot API written in Rust
Documentation
use serde::{Deserialize, Serialize};
/// Represents an HTTP link.
/// # Documentation
/// <https://core.telegram.org/bots/api#link>
#[derive(Clone, Debug, Serialize, Deserialize)]
pub struct Link {
    /// URL of the link
    pub url: Box<str>,
}
impl Link {
    /// Creates a new `Link`.
    ///
    /// # Arguments
    /// * `url` - URL of the link
    #[must_use]
    pub fn new<T0: Into<Box<str>>>(url: T0) -> Self {
        Self {
            url: url.into(),
        }
    }

    /// URL of the link
    #[must_use]
    pub fn url<T: Into<Box<str>>>(mut self, val: T) -> Self {
        self.url = val.into();
        self
    }
}