大的要来了

This commit is contained in:
shenjack 2024-02-20 17:41:33 +08:00
parent 4819880e2c
commit 85f4c6088c
Signed by: shenjack
GPG Key ID: 7B1134A979775551

View File

@ -1,5 +1,6 @@
use pyo3::prelude::*;
use crate::data_struct::messages::{NewMessage, ReplyMessage, SendMessage};
use crate::ClientStatus;
#[pyclass]
@ -104,3 +105,39 @@ impl IcaStatusPy {
Self {}
}
}
#[pyclass]
#[pyo3(name = "NewMessage")]
pub struct NewMessagePy {
pub msg: NewMessage,
}
impl NewMessagePy {
pub fn new(msg: &NewMessage) -> Self {
Self { msg: msg.clone() }
}
}
#[pyclass]
#[pyo3(name = "ReplyMessage")]
pub struct ReplyMessagePy {
pub msg: ReplyMessage,
}
impl ReplyMessagePy {
pub fn new(msg: ReplyMessage) -> Self {
Self { msg }
}
}
#[pyclass]
#[pyo3(name = "SendMessage")]
pub struct SendMessagePy {
pub msg: SendMessage,
}
impl SendMessagePy {
pub fn new(msg: SendMessage) -> Self {
Self { msg }
}
}