ei: add support for libei
This commit is contained in:
parent
084fe50259
commit
40e87f8f91
69 changed files with 4340 additions and 72 deletions
45
src/ei/ei_ifs/ei_pingpong.rs
Normal file
45
src/ei/ei_ifs/ei_pingpong.rs
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
use {
|
||||
crate::{
|
||||
ei::{
|
||||
ei_client::{EiClient, EiClientError},
|
||||
ei_object::{EiObject, EiVersion},
|
||||
},
|
||||
leaks::Tracker,
|
||||
wire_ei::{
|
||||
ei_pingpong::{Done, EiPingpongRequestHandler},
|
||||
EiPingpongId,
|
||||
},
|
||||
},
|
||||
std::rc::Rc,
|
||||
thiserror::Error,
|
||||
};
|
||||
|
||||
#[allow(dead_code)]
|
||||
pub struct EiPingpong {
|
||||
pub id: EiPingpongId,
|
||||
pub client: Rc<EiClient>,
|
||||
pub tracker: Tracker<Self>,
|
||||
pub version: EiVersion,
|
||||
}
|
||||
|
||||
impl EiPingpongRequestHandler for EiPingpong {
|
||||
type Error = EiPingpongError;
|
||||
|
||||
fn done(&self, _req: Done, _slf: &Rc<Self>) -> Result<(), Self::Error> {
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
||||
ei_object_base! {
|
||||
self = EiPingpong;
|
||||
version = self.version;
|
||||
}
|
||||
|
||||
impl EiObject for EiPingpong {}
|
||||
|
||||
#[derive(Debug, Error)]
|
||||
pub enum EiPingpongError {
|
||||
#[error(transparent)]
|
||||
EiClientError(Box<EiClientError>),
|
||||
}
|
||||
efrom!(EiPingpongError, EiClientError);
|
||||
Loading…
Add table
Add a link
Reference in a new issue