Struct telexide::client::WebhookOptions[][src]

pub struct WebhookOptions {
    pub url: Option<Uri>,
    pub path: String,
    pub port: u16,
    pub ip: IpAddr,
}

Represents the options to set for the webhook handling

Fields

url: Option<Uri>path: Stringport: u16ip: IpAddr

Implementations

impl WebhookOptions[src]

pub fn new() -> Self[src]

Creates a new WebhookOptions with default values

By default it will listen on 127.0.0.1:8006 and the path being the root

pub fn set_path(&mut self, path: &str) -> &mut Self[src]

Sets the path of the webhook

pub fn set_port(&mut self, port: u16) -> &mut Self[src]

Sets the port the webhook will be listening on

pub fn set_ip<T: Into<IpAddr>>(&mut self, ip: T) -> &mut Self[src]

Sets the IP the webhook will be listening on

pub fn set_url(&mut self, url: &str) -> TelegramResult<&mut Self>[src]

Sets the url of the webhook

Trait Implementations

impl Clone for WebhookOptions[src]

impl Debug for WebhookOptions[src]

impl Default for WebhookOptions[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> CloneAny for T where
    T: Any + Clone
[src]

impl<T> DebugAny for T where
    T: Any + Debug
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> UnsafeAny for T where
    T: Any