pub struct Protocol { /* private fields */ }
Implementations§
Source§impl Protocol
impl Protocol
pub fn builder() -> ProtocolBuilder
pub async fn handle_request(&self, request: JsonRpcRequest) -> JsonRpcResponse
pub async fn handle_notification(&self, request: JsonRpcNotification)
pub async fn create_request(&self) -> (u64, Receiver<JsonRpcResponse>)
pub async fn handle_response(&self, response: JsonRpcResponse)
pub async fn cancel_response(&self, id: u64)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Protocol
impl !RefUnwindSafe for Protocol
impl Send for Protocol
impl Sync for Protocol
impl Unpin for Protocol
impl !UnwindSafe for Protocol
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more