pub struct Reactor { /* private fields */ }
Implementations§
Source§impl Reactor
impl Reactor
pub fn spawn( capacity: usize, requests: Sender<Request>, notifications: Sender<Notification>, ) -> (Self, Sender<Response>)
pub async fn notify<M, P>( &mut self, method: M, params: P, timeout: Option<Duration>, ) -> bool
pub async fn request<M, P>( &mut self, method: M, params: P, timeout: Option<Duration>, ) -> Option<Receiver<Result<Value, RpcError>>>
pub async fn request_with_id<M, P>( &mut self, id: Id, method: M, params: P, timeout: Option<Duration>, ) -> Option<Receiver<Result<Value, RpcError>>>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Reactor
impl !RefUnwindSafe for Reactor
impl Send for Reactor
impl Sync for Reactor
impl Unpin for Reactor
impl !UnwindSafe for Reactor
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