pub struct Interface { /* private fields */ }Expand description
One interface of the Web API. Wraps an AsyncInterface.
Implementations§
Source§impl Interface
impl Interface
Sourcepub fn new(
http_client: Client,
base_address: Url,
iface: impl Into<String>,
api_key: impl Into<String>,
) -> Self
pub fn new( http_client: Client, base_address: Url, iface: impl Into<String>, api_key: impl Into<String>, ) -> Self
Creates an interface for the given Web API interface.
Sourcepub fn async_interface(&self) -> &AsyncInterface
pub fn async_interface(&self) -> &AsyncInterface
The async interface this wraps.
Sourcepub fn set_timeout(&self, timeout: Duration)
pub fn set_timeout(&self, timeout: Duration)
Sets the timeout for Web API requests.
Sourcepub async fn call(
&self,
func: &str,
version: i32,
args: &[WebApiArgument],
) -> Result<KeyValue, SteamError>
pub async fn call( &self, func: &str, version: i32, args: &[WebApiArgument], ) -> Result<KeyValue, SteamError>
Calls a Web API function.
Sourcepub async fn call_with_method(
&self,
method: Method,
func: &str,
version: i32,
args: &[WebApiArgument],
) -> Result<KeyValue, SteamError>
pub async fn call_with_method( &self, method: Method, func: &str, version: i32, args: &[WebApiArgument], ) -> Result<KeyValue, SteamError>
Calls a Web API function with the given HTTP method.
Auto Trait Implementations§
impl !RefUnwindSafe for Interface
impl !UnwindSafe for Interface
impl Freeze for Interface
impl Send for Interface
impl Sync for Interface
impl Unpin for Interface
impl UnsafeUnpin for Interface
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