pub struct HttpTransport { /* private fields */ }Expand description
HTTP transport with optional SSE support
Implementations§
Source§impl HttpTransport
impl HttpTransport
pub fn new(endpoint: &str, auth: Option<Auth>) -> Result<Self>
pub async fn request(&self, req: JsonRpcRequest) -> Result<JsonRpcResponse>
pub async fn notify(&self, notif: JsonRpcNotification) -> Result<()>
pub async fn close(&self) -> Result<()>
pub fn is_connected(&self) -> bool
Auto Trait Implementations§
impl Freeze for HttpTransport
impl !RefUnwindSafe for HttpTransport
impl Send for HttpTransport
impl Sync for HttpTransport
impl Unpin for HttpTransport
impl !UnwindSafe for HttpTransport
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