Struct steam_tui::client::Client[][src]

pub struct Client { /* fields omitted */ }
Expand description

Manages and interfaces with SteamCmd threads.

Implementations

impl Client[src]

pub fn new() -> Client[src]

Spawns a StemCmd process to interface with.

pub fn is_logged_in(&self) -> Result<bool, STError>[src]

Ensures State is State::LoggedIn.

pub fn get_state(&self) -> Result<State, STError>[src]

pub fn install(&self, id: i32) -> Result<(), STError>[src]

Runs installation script for the provided game id.

pub fn restart(&self) -> Result<(), STError>[src]

Quits previous SteamCmd instance, and spawns a new one. This can be useful for getting more state data. Old processes fail to update due to short comings in SteamCmd.

pub fn run(&self, id: i32, launchables: &[Launch]) -> Result<(), STError>[src]

Launches the provided game id using ‘app_run’ in steemcmd, or the raw executable depending on the Steam client state.

pub fn login(&self, user: &str) -> Result<(), STError>[src]

Attempts to login the provided user string.

pub fn load_games(&self) -> Result<(), STError>[src]

Starts off the process of parsing all games from SteamCmd. First State is set to be in an unloaded state for State::Loaded. The process start by calling ‘licenses_print’ which then extracts packageIDs, and calls ‘package_info_print’ for each package. This in turn extracts appIDs, and gets app particular data by calling ‘app_info_print’ and binds it to a Game object. When all data is loaded, the games are dumped to a file and the state is changed to State::LoggedIn indicating that all data has been extracted and can be presented. TODO(#8): Check for cached games prior to reloading everything, unless explicitly restarted.

pub fn games(&self) -> Result<Vec<Game>, STError>[src]

Extracts games from cached location.

pub fn status(&self, id: i32) -> Result<GameStatus, STError>[src]

Binds data from ‘app_status’ to a GameStatus object.

pub fn start_client(&self) -> Result<(), STError>[src]

Started up a headless steam instance in the background so that games can be launched through steamcmd.

Trait Implementations

impl Default for Client[src]

fn default() -> Self[src]

Returns the “default value” for a type. Read more

impl Drop for Client[src]

fn drop(&mut self)[src]

Executes the destructor for this type. Read more

Auto Trait Implementations

impl RefUnwindSafe for Client

impl Send for Client

impl Sync for Client

impl Unpin for Client

impl UnwindSafe for Client

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<T> From<T> for T[src]

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

pub fn into(self) -> U[src]

Performs the conversion.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

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

Performs the conversion.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

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

Performs the conversion.