pub struct Rpc { /* private fields */ }
Implementations§
source§impl Rpc
impl Rpc
pub fn new(connection: Option<Rc<RefCell<dyn Connection>>>) -> Rc<Rpc>
pub fn subscribe<C, F, P, R>(&self, cmd: C, handle: F)
pub fn unsubscribe<C>(&self, cmd: C)where
C: ToString,
pub fn create_request(&self) -> Rc<Request>
pub fn cmd<T>(&self, cmd: T) -> Rc<Request>where
T: ToString,
pub fn ping(&self) -> Rc<Request>
pub fn ping_msg(&self, payload: impl ToString) -> Rc<Request>
pub fn set_timer<F>(&self, timer_impl: F)
pub fn set_ready(&self, ready: bool)
pub fn get_connection(&self) -> Rc<RefCell<dyn Connection>>
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Rpc
impl !Send for Rpc
impl !Sync for Rpc
impl Unpin for Rpc
impl !UnwindSafe for Rpc
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