create BotMessage.fill_literal method
This commit is contained in:
parent
66180e0cfb
commit
f8c63e5315
@ -421,6 +421,15 @@ pub struct BotMessage {
|
|||||||
handler: Option<BotFunction>,
|
handler: Option<BotFunction>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl BotMessage {
|
||||||
|
pub fn fill_literal(&self, l: String) -> Self {
|
||||||
|
BotMessage {
|
||||||
|
literal: self.clone().literal.or(Some(l)),
|
||||||
|
..self.clone()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
impl Parcelable<BotFunction> for BotMessage {
|
impl Parcelable<BotFunction> for BotMessage {
|
||||||
fn get_field(&mut self, name: &str) -> ParcelableResult<ParcelType<BotFunction>> {
|
fn get_field(&mut self, name: &str) -> ParcelableResult<ParcelType<BotFunction>> {
|
||||||
match name {
|
match name {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user