Struct FlashpointArchive

Source
pub struct FlashpointArchive { /* private fields */ }

Implementations§

Source§

impl FlashpointArchive

Source

pub fn new() -> Self

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 fn parse_user_input(&self, input: &str) -> ParsedInput

Source

pub fn register_extension(&mut self, ext: ExtensionInfo) -> Result<(), Error>

Source

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

Source

pub async fn search_games_index( &self, search: &mut GameSearch, limit: Option<i64>, ) -> 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_developers( &self, search: Option<GameSearch>, ) -> Result<Vec<String>, Error>

Source

pub async fn find_all_game_publishers( &self, search: Option<GameSearch>, ) -> Result<Vec<String>, Error>

Source

pub async fn find_all_game_series( &self, search: Option<GameSearch>, ) -> Result<Vec<String>, 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_by_id( &self, game_id: &str, ) -> 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>

Source

pub async fn new_custom_id_order( &self, custom_id_order: Vec<String>, ) -> 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>,

Source§

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>,

Source§

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