pub struct HttpSender { /* private fields */ }Implementations§
Source§impl HttpSender
The standard RpcSender over HTTP.
impl HttpSender
The standard RpcSender over HTTP.
Sourcepub fn new(url: String) -> Self
pub fn new(url: String) -> Self
Create an HTTP RPC sender.
The URL is an HTTP URL, usually for port 8899, as in “http://localhost:8899”. The sender has a default timeout of 30 seconds.
Sourcepub fn new_with_timeout(url: String, timeout: Duration) -> Self
pub fn new_with_timeout(url: String, timeout: Duration) -> Self
Create an HTTP RPC sender.
The URL is an HTTP URL, usually for port 8899.
Trait Implementations§
Source§impl RpcSender for HttpSender
impl RpcSender for HttpSender
fn get_transport_stats(&self) -> RpcTransportStats
fn send(&self, request: RpcRequest, params: Value) -> Result<Value>
Auto Trait Implementations§
impl !Freeze for HttpSender
impl !RefUnwindSafe for HttpSender
impl Send for HttpSender
impl Sync for HttpSender
impl Unpin for HttpSender
impl !UnwindSafe for HttpSender
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more