pub struct EditUserStarSubscription {
pub user_id: UserId,
pub telegram_payment_charge_id: TelegramTransactionId,
pub is_canceled: bool,
}Expand description
Allows the bot to cancel or re-enable extension of a subscription paid in Telegram Stars. Returns True on success.
Fields§
§user_id: UserIdIdentifier of the user whose subscription will be edited
telegram_payment_charge_id: TelegramTransactionIdTelegram payment identifier for the subscription
is_canceled: boolPass true to cancel extension of the user subscription; the subscription must be active up to the end of the current subscription period. Pass false to allow the user to re-enable a subscription that was previously canceled by the bot.
Implementations§
Source§impl EditUserStarSubscription
impl EditUserStarSubscription
pub fn new( user_id: UserId, telegram_payment_charge_id: TelegramTransactionId, is_canceled: bool, ) -> Self
Trait Implementations§
Source§impl Clone for EditUserStarSubscription
impl Clone for EditUserStarSubscription
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 EditUserStarSubscription
impl Debug for EditUserStarSubscription
Source§impl Hash for EditUserStarSubscription
impl Hash for EditUserStarSubscription
Source§impl PartialEq for EditUserStarSubscription
impl PartialEq for EditUserStarSubscription
Source§impl Payload for EditUserStarSubscription
impl Payload for EditUserStarSubscription
Source§fn timeout_hint(&self) -> Option<Duration>
fn timeout_hint(&self) -> Option<Duration>
If this payload may take long time to execute (e.g.
GetUpdates with
big timeout), the minimum timeout that should be used.Source§impl Serialize for EditUserStarSubscription
impl Serialize for EditUserStarSubscription
impl Eq for EditUserStarSubscription
impl StructuralPartialEq for EditUserStarSubscription
Auto Trait Implementations§
impl Freeze for EditUserStarSubscription
impl RefUnwindSafe for EditUserStarSubscription
impl Send for EditUserStarSubscription
impl Sync for EditUserStarSubscription
impl Unpin for EditUserStarSubscription
impl UnwindSafe for EditUserStarSubscription
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<P> EditUserStarSubscriptionSetters for Pwhere
P: HasPayload<Payload = EditUserStarSubscription>,
impl<P> EditUserStarSubscriptionSetters for Pwhere
P: HasPayload<Payload = EditUserStarSubscription>,
Source§fn telegram_payment_charge_id(self, value: TelegramTransactionId) -> Self
fn telegram_payment_charge_id(self, value: TelegramTransactionId) -> Self
Setter for
telegram_payment_charge_id field.Source§fn is_canceled(self, value: bool) -> Self
fn is_canceled(self, value: bool) -> Self
Setter for
is_canceled field.Source§impl<T> Erasable for T
impl<T> Erasable for T
Source§impl<P> HasPayload for Pwhere
P: Payload,
impl<P> HasPayload for Pwhere
P: Payload,
Source§fn payload_mut(&mut self) -> &mut <P as HasPayload>::Payload
fn payload_mut(&mut self) -> &mut <P as HasPayload>::Payload
Gain mutable access to the underlying payload.
Source§fn payload_ref(&self) -> &<P as HasPayload>::Payload
fn payload_ref(&self) -> &<P as HasPayload>::Payload
Gain immutable access to the underlying payload.
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more