pub struct FlashpointArchive { /* private fields */ }

Implementations§

source§

impl FlashpointArchive

source

pub fn new() -> FlashpointArchive

source

pub fn load_database(&mut self, source: &str) -> Result<(), Error>

Load a new database for Flashpoint. Open databases will close.

source - Path to database file, or :memory: to open a fresh database in memory

source

pub async fn search_games( &self, search: &GameSearch ) -> Result<Vec<Game>, Error>

source

pub async fn search_games_index( &self, search: &mut GameSearch ) -> Result<Vec<PageTuple>, Error>

source

pub async fn search_games_total( &self, search: &GameSearch ) -> Result<i64, Error>

source

pub async fn search_games_with_tag(&self, tag: &str) -> Result<Vec<Game>, Error>

source

pub async fn search_games_random( &self, search: &GameSearch, count: i64 ) -> Result<Vec<Game>, Error>

source

pub async fn search_tag_suggestions( &self, partial: &str, blacklist: Vec<String> ) -> Result<Vec<TagSuggestion>, Error>

source

pub async fn search_platform_suggestions( &self, partial: &str ) -> Result<Vec<TagSuggestion>, Error>

source

pub async fn find_all_game_ids(&self) -> Result<Vec<String>, Error>

source

pub async fn find_game(&self, id: &str) -> Result<Option<Game>, Error>

source

pub async fn create_game( &self, partial_game: &PartialGame ) -> Result<Game, Error>

source

pub async fn save_game( &self, partial_game: &mut PartialGame ) -> Result<Game, Error>

source

pub async fn save_games( &self, partial_games: Vec<&mut PartialGame> ) -> Result<(), Error>

source

pub async fn delete_game(&self, id: &str) -> Result<(), Error>

source

pub async fn count_games(&self) -> Result<i64, Error>

source

pub async fn find_add_app_by_id( &self, id: &str ) -> Result<Option<AdditionalApp>, Error>

source

pub async fn create_add_app( &self, add_app: &mut AdditionalApp ) -> Result<(), Error>

source

pub async fn find_game_data_by_id( &self, game_data_id: i64 ) -> Result<Option<GameData>, Error>

source

pub async fn find_game_data( &self, game_id: &str ) -> Result<Vec<GameData>, Error>

source

pub async fn create_game_data( &self, game_data: &PartialGameData ) -> Result<GameData, Error>

source

pub async fn save_game_data( &self, game_data: &PartialGameData ) -> Result<GameData, Error>

source

pub async fn delete_game_data(&self, id: i64) -> Result<(), Error>

source

pub async fn find_all_tags(&self) -> Result<Vec<Tag>, Error>

source

pub async fn find_tag(&self, name: &str) -> Result<Option<Tag>, Error>

source

pub async fn find_tag_by_id(&self, id: i64) -> Result<Option<Tag>, Error>

source

pub async fn create_tag( &self, name: &str, category: Option<String>, id: Option<i64> ) -> Result<Tag, Error>

source

pub async fn save_tag(&self, partial: &mut PartialTag) -> Result<Tag, Error>

source

pub async fn delete_tag(&self, name: &str) -> Result<(), Error>

source

pub async fn delete_tag_by_id(&self, id: i64) -> Result<(), Error>

source

pub async fn count_tags(&self) -> Result<i64, Error>

source

pub async fn merge_tags( &self, name: &str, merged_into: &str ) -> Result<Tag, Error>

source

pub async fn find_all_platforms(&self) -> Result<Vec<Tag>, Error>

source

pub async fn find_platform(&self, name: &str) -> Result<Option<Tag>, Error>

source

pub async fn find_platform_by_id(&self, id: i64) -> Result<Option<Tag>, Error>

source

pub async fn create_platform( &self, name: &str, id: Option<i64> ) -> Result<Tag, Error>

source

pub async fn save_platform( &self, partial: &mut PartialTag ) -> Result<Tag, Error>

source

pub async fn delete_platform(&self, name: &str) -> Result<(), Error>

source

pub async fn count_platforms(&self) -> Result<i64, Error>

source

pub async fn find_all_tag_categories(&self) -> Result<Vec<TagCategory>, Error>

source

pub async fn find_tag_category( &self, name: &str ) -> Result<Option<TagCategory>, Error>

source

pub async fn find_tag_category_by_id( &self, id: i64 ) -> Result<Option<TagCategory>, Error>

source

pub async fn create_tag_category( &self, partial: &PartialTagCategory ) -> Result<TagCategory, Error>

source

pub async fn save_tag_category( &self, partial: &PartialTagCategory ) -> Result<TagCategory, Error>

source

pub async fn new_tag_filter_index( &self, search: &mut GameSearch ) -> Result<(), Error>

source

pub async fn find_all_game_libraries(&self) -> Result<Vec<String>, Error>

source

pub async fn find_all_game_statuses(&self) -> Result<Vec<String>, Error>

source

pub async fn find_all_game_play_modes(&self) -> Result<Vec<String>, Error>

source

pub async fn find_all_game_application_paths( &self ) -> Result<Vec<String>, Error>

source

pub async fn find_platform_app_paths( &self ) -> Result<HashMap<String, Vec<PlatformAppPath>>, Error>

source

pub async fn add_game_playtime( &self, game_id: &str, seconds: i64 ) -> Result<(), Error>

source

pub async fn clear_playtime_tracking(&self) -> Result<(), Error>

source

pub async fn force_games_active_data_most_recent(&self) -> Result<(), Error>

source

pub async fn find_game_redirects(&self) -> Result<Vec<GameRedirect>, Error>

source

pub async fn create_game_redirect( &self, src_id: &str, dest_id: &str ) -> Result<(), Error>

source

pub async fn delete_game_redirect( &self, src_id: &str, dest_id: &str ) -> Result<(), Error>

source

pub async fn update_apply_categories( &self, cats: Vec<RemoteCategory> ) -> Result<(), Error>

source

pub async fn update_apply_platforms( &self, platforms: Vec<RemotePlatform> ) -> Result<(), Error>

source

pub async fn update_apply_tags(&self, tags: Vec<RemoteTag>) -> Result<(), Error>

source

pub async fn update_apply_games( &self, games_res: &RemoteGamesRes ) -> Result<(), Error>

source

pub async fn update_delete_games( &self, games_res: &RemoteDeletedGamesRes ) -> Result<(), Error>

source

pub async fn update_apply_redirects( &self, redirects_res: Vec<GameRedirect> ) -> Result<(), Error>

source

pub async fn optimize_database(&self) -> Result<(), Error>

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

source§

fn vzip(self) -> V