pub struct Client { /* private fields */ }Expand description
XML-RPC client that communicates with a hub endpoint.
Implementations§
Source§impl Client
impl Client
Sourcepub fn new(hub_url: &str) -> Client
pub fn new(hub_url: &str) -> Client
A client bound by configured_timeout.
Sourcepub fn with_timeout(hub_url: &str, timeout: Option<Duration>) -> Client
pub fn with_timeout(hub_url: &str, timeout: Option<Duration>) -> Client
A client bound by timeout, or unbounded when it is None.
For a caller that knows better than the environment does — a deep sweep that has measured what its own pages cost, say.
Sourcepub fn hub_url(&self) -> &str
pub fn hub_url(&self) -> &str
Call an XML-RPC method with the given parameters. The hub this client talks to, for callers that report it. Any trailing slash has been trimmed.
Sourcepub fn multicall(
&self,
calls: &[(&str, Vec<Value>)],
) -> Result<Vec<Result<Value, Error>>, Error>
pub fn multicall( &self, calls: &[(&str, Vec<Value>)], ) -> Result<Vec<Result<Value, Error>>, Error>
Several calls in one request, through the hub’s multiCall:
one round trip instead of one each. The outer Err is the
request failing; each inner result is one call’s answer, or its
fault, in the order the calls were given.
pub fn call(&self, method: &str, params: &[Value]) -> Result<Value, Error>
Auto Trait Implementations§
impl !RefUnwindSafe for Client
impl !UnwindSafe for Client
impl Forget for Client
impl Freeze for Client
impl Send for Client
impl Sync for Client
impl Unpin for Client
impl UnsafeUnpin for Client
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