pub struct HttpTransport<H>where
H: Handler,{ /* private fields */ }Expand description
A JSON-RPC over HTTP transport built around the jsonrpc_http_server library.
Implementations§
Source§impl<H> HttpTransport<H>where
H: Handler,
impl<H> HttpTransport<H>where
H: Handler,
Sourcepub fn new(settings: HttpTransportSettings) -> Self
pub fn new(settings: HttpTransportSettings) -> Self
Create a new instance of this transport.
Trait Implementations§
Source§impl<H> Transport<H> for HttpTransport<H>
impl<H> Transport<H> for HttpTransport<H>
Source§fn requires_reset(&self) -> bool
fn requires_reset(&self) -> bool
Tell whether this transport requires reconfiguration if the IO handler of the server is
changed. Read more
Source§fn set_handler(
&mut self,
handler: Arc<Mutex<H>>,
runtime: Option<Handle>,
) -> Result<(), TransportError>
fn set_handler( &mut self, handler: Arc<Mutex<H>>, runtime: Option<Handle>, ) -> Result<(), TransportError>
Set the IO handler that the transport will use to process the JSON-RPC messages it receives.
Auto Trait Implementations§
impl<H> Freeze for HttpTransport<H>
impl<H> !RefUnwindSafe for HttpTransport<H>
impl<H> Send for HttpTransport<H>
impl<H> Sync for HttpTransport<H>
impl<H> Unpin for HttpTransport<H>
impl<H> !UnwindSafe for HttpTransport<H>
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