Struct tbot::methods::SendInvoice[][src]

#[must_use = "methods do nothing unless turned into a future"]pub struct SendInvoice<'a> { /* fields omitted */ }

Sends an invoice.

Reflects the sendInvoice method.

Implementations

impl<'a> SendInvoice<'a>[src]

pub fn provider_data(self, provider_data: impl Into<String>) -> Self[src]

Configures data for your payment provider. Reflects the provider_data parameter.

pub fn photo(self, photo: Photo) -> Self[src]

Configures a photo for the invoice. Reflects the photo_url, photo_width and photo_height parameters.

pub const fn is_name_needed(self, is_needed: bool) -> Self[src]

Configures whether the user must specify their name. Reflects the need_name parameters.

pub const fn is_phone_number_needed(self, is_needed: bool) -> Self[src]

Configures whether the user must specify their phone number. Reflects the need_phone_number parameter.

pub const fn is_email_needed(self, is_needed: bool) -> Self[src]

Configures whether the user must specify their email. Reflects the need_email parameter.

pub const fn is_shipping_address_needed(self, is_needed: bool) -> Self[src]

Configures whether the user must specify their shipping address. Reflects the need_shipping_address parameter.

pub const fn should_send_phone_number_to_provider(self, must_send: bool) -> Self[src]

Configures whether the user’s phone must be sent to your payment provider. Reflects the send_phone_number_to_provider parameter.

pub const fn should_send_email_to_provider(self, must_send: bool) -> Self[src]

Configures whether the user’s email must be sent to your payment provider. Reflects the send_email_to_provider parameter.

pub const fn is_flexible(self, is_flexible: bool) -> Self[src]

Configures whether the final price depends on the shipping method. Reflects the is_flexible parameter.

pub const fn is_notification_disabled(self, is_disabled: bool) -> Self[src]

Configures whether the message is sent silently. Reflects the disable_notification parameter.

pub const fn in_reply_to(self, id: Id) -> Self[src]

Configures which message this invoice is sent in reply to. Reflects the reply_to_message_id parameter.

pub const fn allow_sending_without_reply(self) -> Self[src]

Configures whether this message should be sent even if the replied-to message is not found. Reflects the allow_sending_without_reply parameter.

pub fn reply_markup(self, markup: Keyboard) -> Self[src]

Configures a keyboard for the message. Reflects the reply_markup parameter.

impl SendInvoice<'_>[src]

pub async fn call(self) -> Result<Message, MethodCall>[src]

Calls the method.

Trait Implementations

impl<'a> Clone for SendInvoice<'a>[src]

impl<'a> Debug for SendInvoice<'a>[src]

impl<'a> Serialize for SendInvoice<'a>[src]

Auto Trait Implementations

impl<'a> !RefUnwindSafe for SendInvoice<'a>

impl<'a> Send for SendInvoice<'a>

impl<'a> Sync for SendInvoice<'a>

impl<'a> Unpin for SendInvoice<'a>

impl<'a> !UnwindSafe for SendInvoice<'a>

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

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

impl<T> Same<T> for T

type Output = T

Should always be Self

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