pub struct LcuClient { /* private fields */ }Implementations§
Source§impl LcuClient
impl LcuClient
Sourcepub fn new() -> Result<Self>
pub fn new() -> Result<Self>
Examples found in repository?
examples/current_summoner.rs (line 5)
4async fn main() -> rusty_lcu::Result<()> {
5 let mut client = LcuClient::new()?;
6 client.connect().await?;
7
8 let summoner =
9 generated::get_lol_summoner_v1_current_summoner_typed(&client, EndpointParams::new())
10 .await?;
11
12 println!(
13 "{}#{} is level {}",
14 summoner.game_name, summoner.tag_line, summoner.summoner_level
15 );
16
17 Ok(())
18}pub fn with_credentials(credentials: Credentials) -> Result<Self>
pub fn set_default_request_options(&mut self, options: RequestOptions)
Sourcepub async fn connect(&mut self) -> Result<()>
pub async fn connect(&mut self) -> Result<()>
Examples found in repository?
examples/current_summoner.rs (line 6)
4async fn main() -> rusty_lcu::Result<()> {
5 let mut client = LcuClient::new()?;
6 client.connect().await?;
7
8 let summoner =
9 generated::get_lol_summoner_v1_current_summoner_typed(&client, EndpointParams::new())
10 .await?;
11
12 println!(
13 "{}#{} is level {}",
14 summoner.game_name, summoner.tag_line, summoner.summoner_level
15 );
16
17 Ok(())
18}pub async fn connect_with(&mut self, source: CredentialsSource) -> Result<()>
pub async fn connect_with_options( &mut self, source: CredentialsSource, options: ConnectOptions, ) -> Result<()>
pub fn credentials(&self) -> Option<&Credentials>
pub async fn event_stream(&self) -> Result<EventStream>
pub async fn wait_until_ready( &self, readiness_check: ReadinessCheck, ) -> Result<()>
pub async fn get(&self, path: &str) -> Result<Value>
pub async fn get_as<T>(&self, path: &str) -> Result<T>where
T: DeserializeOwned,
pub async fn post(&self, path: &str, params: EndpointParams) -> Result<Value>
pub async fn post_as<T>(&self, path: &str, params: EndpointParams) -> Result<T>where
T: DeserializeOwned,
pub async fn put(&self, path: &str, params: EndpointParams) -> Result<Value>
pub async fn put_as<T>(&self, path: &str, params: EndpointParams) -> Result<T>where
T: DeserializeOwned,
pub async fn patch(&self, path: &str, params: EndpointParams) -> Result<Value>
pub async fn patch_as<T>(&self, path: &str, params: EndpointParams) -> Result<T>where
T: DeserializeOwned,
pub async fn delete(&self, path: &str, params: EndpointParams) -> Result<Value>
pub async fn delete_as<T>(
&self,
path: &str,
params: EndpointParams,
) -> Result<T>where
T: DeserializeOwned,
pub async fn request_endpoint( &self, endpoint: &'static Endpoint, params: EndpointParams, ) -> Result<Value>
pub async fn request_endpoint_as<T>(
&self,
endpoint: &'static Endpoint,
params: EndpointParams,
) -> Result<T>where
T: DeserializeOwned,
pub async fn poll_endpoint<F>( &self, endpoint: &'static Endpoint, params: EndpointParams, options: PollOptions, callback: F, ) -> Result<()>
pub async fn poll_endpoint_as<T, F>( &self, endpoint: &'static Endpoint, params: EndpointParams, options: PollOptions, callback: F, ) -> Result<()>
pub async fn request( &self, method: Method, path: &str, params: EndpointParams, ) -> Result<Value>
pub async fn request_as<T>(
&self,
method: Method,
path: &str,
params: EndpointParams,
) -> Result<T>where
T: DeserializeOwned,
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for LcuClient
impl !UnwindSafe for LcuClient
impl Freeze for LcuClient
impl Send for LcuClient
impl Sync for LcuClient
impl Unpin for LcuClient
impl UnsafeUnpin for LcuClient
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