mirror of
https://github.com/teloxide/teloxide.git
synced 2024-12-23 06:51:01 +01:00
add implementation From for ReplyMarkup
This commit is contained in:
parent
c2fb937763
commit
afa877ff56
1 changed files with 24 additions and 0 deletions
|
@ -12,3 +12,27 @@ pub enum ReplyMarkup {
|
|||
ReplyKeyboardRemove(ReplyKeyboardRemove),
|
||||
ForceReply(ForceReply),
|
||||
}
|
||||
|
||||
impl From<InlineKeyboardMarkup> for ReplyMarkup {
|
||||
fn from(markup: InlineKeyboardMarkup) -> Self {
|
||||
ReplyMarkup::Inline(markup)
|
||||
}
|
||||
}
|
||||
|
||||
impl From<ForceReply> for ReplyMarkup {
|
||||
fn from(markup: ForceReply) -> Self {
|
||||
ReplyMarkup::ForceReply(markup)
|
||||
}
|
||||
}
|
||||
|
||||
impl From<ReplyKeyboardMarkup> for ReplyMarkup {
|
||||
fn from(markup: ReplyKeyboardMarkup) -> Self {
|
||||
ReplyMarkup::ReplyKeyboardMarkup(markup)
|
||||
}
|
||||
}
|
||||
|
||||
impl From<ReplyKeyboardRemove> for ReplyMarkup {
|
||||
fn from(markup: ReplyKeyboardRemove) -> Self {
|
||||
ReplyMarkup::ReplyKeyboardRemove(markup)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue