pub struct EpicSource { /* private fields */ }Expand description
Source responsável por importar jogos instalados via Epic Games
Implementations§
Source§impl EpicSource
impl EpicSource
pub fn new(app_handle: AppHandle, wine_prefix: Option<PathBuf>) -> Self
Sourcepub async fn import_installed(&self) -> Result<Vec<SourceGame>, AppError>
pub async fn import_installed(&self) -> Result<Vec<SourceGame>, AppError>
Importa todos os jogos instalados detectados nos manifestos locais
Source§impl EpicSource
impl EpicSource
Sourcepub async fn fetch_library_detailed(&self) -> Result<Vec<SourceGame>, AppError>
pub async fn fetch_library_detailed(&self) -> Result<Vec<SourceGame>, AppError>
Importa a biblioteca completa de jogos possuídos na conta Epic (requer login prévio).
Trait Implementations§
Source§impl GameSource for EpicSource
impl GameSource for EpicSource
fn fetch_games<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<SourceGame>, AppError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§impl OAuthGameSource for EpicSource
impl OAuthGameSource for EpicSource
Source§fn login<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), AppError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn login<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), AppError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
A Epic não devolve code na query do redirect (como o GOG) — o authorizationCode
vem como JSON no corpo da própria página de redirect. Um script injetado via
on_page_load lê esse corpo e navega para uma pseudo-URL própria
(playlite://epic-auth-code?data=...), que o on_navigation consegue interceptar
(ele só recebe a URL da navegação, nunca o conteúdo da página).
Source§fn oauth_config(&self) -> &OAuthProviderConfig
fn oauth_config(&self) -> &OAuthProviderConfig
Configuração do provedor (endpoints, client_id, escopos, etc.).
Source§fn app_handle(&self) -> &AppHandle
fn app_handle(&self) -> &AppHandle
Handle da aplicação, necessário para acessar o secrets.db.
Source§fn is_authenticated(&self) -> Result<bool, AppError>
fn is_authenticated(&self) -> Result<bool, AppError>
Verifica se existe um token salvo para este provedor.
Auto Trait Implementations§
impl Freeze for EpicSource
impl !RefUnwindSafe for EpicSource
impl Send for EpicSource
impl Sync for EpicSource
impl Unpin for EpicSource
impl UnsafeUnpin for EpicSource
impl !UnwindSafe for EpicSource
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> 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