pub trait Service: Sized + Message {
const NAME: &'static str;
const ID: u64;
fn read(b: impl Buf) -> Result<Self, ()>;
fn write(&self, b: &mut impl BufMut) -> Result<(), ()>;
fn read_result(b: impl Buf) -> Result<Self::Result, ()>;
fn write_result(r: &Self::Result, b: &mut impl BufMut) -> Result<(), ()>;
fn to_buf(&self) -> Result<Bytes, ()> { ... }
fn make_ann_dispatch(&self, to: Uuid) -> Result<Dispatch, ()> { ... }
fn make_call_dispatch(&self, to: Uuid) -> Result<Dispatch, ()> { ... }
}
Loading content...Loading content...Loading content...Loading content...