Struct tbot::types::parameters::Tip
source · pub struct Tip { /* private fields */ }
Expand description
Represents tip parameters.
Implementations§
source§impl Tip
impl Tip
sourcepub const fn with_max(max_tip: u32) -> Self
pub const fn with_max(max_tip: u32) -> Self
Constructs a Tip
with the given max tip amount.
Reflects the max_tip_amount
parameter.
sourcepub fn suggested_tips(self, tips: impl Into<Vec<u32>>) -> Self
pub fn suggested_tips(self, tips: impl Into<Vec<u32>>) -> Self
Configures suggested tip amounts for the invoice. At most 4 suggestions
can be specified; this method automatically sorts them.
Reflects the suggested_tip_amounts
parameter.
Panics
Panics if:
- there are 0 or more than 4 tips;
- there are duplicated tips;
- the biggest tip exceeds
max_tip_amount
.