pub struct LegendaryClient { /* private fields */ }Implementations§
Source§impl LegendaryClient
impl LegendaryClient
pub fn new() -> Result<Self>
pub async fn exchange_auth_code(&mut self, code: &str) -> Result<AuthToken>
pub async fn resume_session(&mut self, token: &AuthToken) -> bool
pub fn get_token(&self) -> Result<AuthToken>
pub async fn get_games(&mut self) -> Result<Vec<Game>>
Sourcepub async fn enrich_game_details(
&self,
token: &AuthToken,
app_name: &str,
namespace: &str,
catalog_item_id: &str,
) -> Game
pub async fn enrich_game_details( &self, token: &AuthToken, app_name: &str, namespace: &str, catalog_item_id: &str, ) -> Game
Try to enrich a game with catalog details (images, proper title) This is non-blocking and uses a fallback if the catalog item doesn’t exist
pub async fn download_manifest( &mut self, _token: &AuthToken, app_name: &str, ) -> Result<GameManifest>
pub async fn download_chunk( &self, _chunk_guid: &str, _token: &AuthToken, ) -> Result<Vec<u8>>
pub async fn check_for_updates( &self, _token: &AuthToken, _app_name: &str, _current_version: &str, ) -> Result<Option<String>>
pub async fn get_cloud_saves( &self, _token: &AuthToken, _app_name: &str, ) -> Result<Vec<CloudSave>>
pub async fn download_cloud_save( &self, _token: &AuthToken, _save_id: &str, ) -> Result<Vec<u8>>
pub async fn upload_cloud_save( &self, _token: &AuthToken, _app_name: &str, _data: &[u8], ) -> Result<()>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for LegendaryClient
impl !RefUnwindSafe for LegendaryClient
impl Send for LegendaryClient
impl Sync for LegendaryClient
impl Unpin for LegendaryClient
impl !UnwindSafe for LegendaryClient
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
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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