pub struct StdioRpc { /* private fields */ }Implementations§
Source§impl StdioRpc
impl StdioRpc
pub fn spawn(command: Command) -> Result<Self, Error>
pub async fn send_request( &mut self, method: impl Into<String>, params: Value, ) -> Result<RequestId, Error>
pub async fn send_notification( &mut self, method: impl Into<String>, params: Value, ) -> Result<(), Error>
pub async fn next(&mut self) -> Result<IncomingMessage, Error>
pub async fn respond(&mut self, id: PeerId, result: Value) -> Result<(), Error>
pub async fn respond_error( &mut self, id: PeerId, code: i64, message: impl Into<String>, data: Option<Value>, ) -> Result<(), Error>
pub async fn shutdown(self) -> Result<ProcessExit, Error>
Auto Trait Implementations§
impl !RefUnwindSafe for StdioRpc
impl !UnwindSafe for StdioRpc
impl Freeze for StdioRpc
impl Send for StdioRpc
impl Sync for StdioRpc
impl Unpin for StdioRpc
impl UnsafeUnpin for StdioRpc
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