pub struct Protocol<T: Transport> { /* private fields */ }
Implementations§
Source§impl<T: Transport> Protocol<T>
impl<T: Transport> Protocol<T>
pub fn builder(transport: T) -> ProtocolBuilder<T>
pub async fn notify(&self, method: &str, params: Option<Value>) -> Result<()>
pub async fn request( &self, method: &str, params: Option<Value>, options: RequestOptions, ) -> Result<JsonRpcResponse>
pub async fn listen(&self) -> Result<()>
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for Protocol<T>
impl<T> !RefUnwindSafe for Protocol<T>
impl<T> Send for Protocol<T>
impl<T> Sync for Protocol<T>
impl<T> Unpin for Protocol<T>
impl<T> !UnwindSafe for Protocol<T>
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