pub struct WebsocketRpc {
pub id: u64,
/* private fields */
}Fields§
§id: u64Implementations§
Source§impl WebsocketRpc
impl WebsocketRpc
pub fn new( id: u64, protocol_manager: Arc<Mutex<RpcManager>>, send_channel: Sender<Vec<u8>>, ) -> Self
pub fn on<F>(&self, event_type: EventType, callback: F)
pub fn abort(&mut self, error: String)
pub async fn send(&self, payload: &Value) -> Result<(), String>
pub async fn end(&self) -> Result<(), String>
pub fn handle_response(&mut self, response: &Value)
Trait Implementations§
Source§impl Clone for WebsocketRpc
impl Clone for WebsocketRpc
Source§fn clone(&self) -> WebsocketRpc
fn clone(&self) -> WebsocketRpc
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for WebsocketRpc
impl !RefUnwindSafe for WebsocketRpc
impl Send for WebsocketRpc
impl Sync for WebsocketRpc
impl Unpin for WebsocketRpc
impl !UnwindSafe for WebsocketRpc
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