Struct telexide_fork::client::WebhookOptions
source · pub struct WebhookOptions {
pub url: Option<Uri>,
pub path: String,
pub port: u16,
pub ip: IpAddr,
}Expand description
Represents the options to set for the webhook handling
Fields§
§url: Option<Uri>§path: String§port: u16§ip: IpAddrImplementations§
source§impl WebhookOptions
impl WebhookOptions
sourcepub fn new() -> Self
pub fn new() -> Self
Creates a new WebhookOptions with default values
By default it will listen on 127.0.0.1:8006 and the path being the root
sourcepub fn set_port(&mut self, port: u16) -> &mut Self
pub fn set_port(&mut self, port: u16) -> &mut Self
Sets the port the webhook will be listening on
sourcepub fn set_ip<T: Into<IpAddr>>(&mut self, ip: T) -> &mut Self
pub fn set_ip<T: Into<IpAddr>>(&mut self, ip: T) -> &mut Self
Sets the IP the webhook will be listening on
sourcepub fn set_url(&mut self, url: &str) -> TelegramResult<&mut Self>
pub fn set_url(&mut self, url: &str) -> TelegramResult<&mut Self>
Sets the url of the webhook
Trait Implementations§
source§impl Clone for WebhookOptions
impl Clone for WebhookOptions
source§fn clone(&self) -> WebhookOptions
fn clone(&self) -> WebhookOptions
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 more