1
0
Fork 0
forked from wry/wry

wire: generate trait for request handling

This commit is contained in:
Julian Orth 2024-04-08 17:37:35 +02:00
parent e3a1a0b30f
commit acb391335b
102 changed files with 1632 additions and 2086 deletions

View file

@ -1,5 +1,9 @@
use {
crate::{client::ClientError, utils::buffd::MsgParser, wire::WlDisplayId},
crate::{
client::{Client, ClientError},
utils::buffd::MsgParser,
wire::WlDisplayId,
},
std::{
any::Any,
cmp::Ordering,
@ -34,9 +38,11 @@ impl Display for ObjectId {
pub trait ObjectBase {
fn id(&self) -> ObjectId;
fn version(&self) -> Version;
fn into_any(self: Rc<Self>) -> Rc<dyn Any>;
fn handle_request(
self: Rc<Self>,
client: &Client,
request: u32,
parser: MsgParser<'_, '_>,
) -> Result<(), ClientError>;