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 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 WebhookOptions
impl Debug for WebhookOptions
Auto Trait Implementations§
impl !Freeze for WebhookOptions
impl RefUnwindSafe for WebhookOptions
impl Send for WebhookOptions
impl Sync for WebhookOptions
impl Unpin for WebhookOptions
impl UnwindSafe for WebhookOptions
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