[][src]Struct tbot::event_loop::webhook::Webhook

#[must_use = "webhook does not start unless `start` is called"]pub struct Webhook<'a, C> { /* fields omitted */ }

Configures webhook and starts a server.

To construct a Webhook, use Bot::webhook.

Methods

impl<'a, C> Webhook<'a, C>[src]

pub const fn ip(self, ip: IpAddr) -> Self[src]

Configures the IP tbot will bind to.

pub fn accept_updates_on(self, url: String) -> Self[src]

Configures the URL that tbot will accept connections to. / by default.

Panics

Panics if the URL doesn't starts with /.

pub fn certificate(self, certificate: &'a str) -> Self[src]

Configures certificate.

pub fn max_connections(self, max: u8) -> Self[src]

Configures max_connections.

pub fn allowed_updates(self, updates: &'a [UpdateKind]) -> Self[src]

Configures allowed_updates.

pub const fn request_timeout(self, timeout: Duration) -> Self[src]

Configures for how long tbot should wait for setWebhook. If you don't configure this value, it is set to 60s.

pub const fn http(self) -> Http<'a, C>[src]

Configures a webhook server over HTTP. For HTTPS, see the https method.

pub const fn https(self, identity: Identity) -> Https<'a, C>[src]

Configures a webhook server over HTTPS. For HTTP, see the http method.

Auto Trait Implementations

impl<'a, C> !RefUnwindSafe for Webhook<'a, C>

impl<'a, C> Send for Webhook<'a, C> where
    C: Send + Sync

impl<'a, C> Sync for Webhook<'a, C> where
    C: Send + Sync

impl<'a, C> Unpin for Webhook<'a, C>

impl<'a, C> !UnwindSafe for Webhook<'a, C>

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> 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, 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> WithSubscriber for T[src]