pub trait Service {
// Required methods
fn write_(&mut self, ctx: ServiceContext) -> ProtocolResult<String>;
fn read_(&self, ctx: ServiceContext) -> ProtocolResult<String>;
// Provided methods
fn genesis_(&mut self, _payload: String) -> ProtocolResult<()> { ... }
fn hook_before_(&mut self) -> ProtocolResult<()> { ... }
fn hook_after_(&mut self) -> ProtocolResult<()> { ... }
}