Struct steamworks::Apps

source ·
pub struct Apps<Manager> { /* private fields */ }
Expand description

Access to the steam apps interface

Implementations§

source§

impl<Manager> Apps<Manager>

source

pub fn is_app_installed(&self, app_id: AppId) -> bool

Returns whether the user currently has the app with the given ID currently installed.

This does not mean the user owns the game.

source

pub fn is_dlc_installed(&self, app_id: AppId) -> bool

Returns whether the user owns the specific dlc and has it installed.

source

pub fn is_subscribed_app(&self, app_id: AppId) -> bool

Returns whether the user is subscribed to the app with the given ID.

This should only be used to check ownership of a game related to yours (e.g. demo).

source

pub fn is_subscribed_from_free_weekend(&self) -> bool

Returns whether the user is subscribed via a free weekend

source

pub fn is_vac_banned(&self) -> bool

Returns whether the user has a VAC ban on their account.

source

pub fn is_cybercafe(&self) -> bool

Returns whether the license for the current app ID is for cyber cafes.

source

pub fn is_low_violence(&self) -> bool

Returns whether the license for the current app ID provides low violence depots.

source

pub fn is_subscribed(&self) -> bool

Returns whether the user is subscribed to the current app ID

source

pub fn app_build_id(&self) -> i32

Returns the build id of this app.

source

pub fn app_install_dir(&self, app_id: AppId) -> String

Returns the installation folder of the app with the given ID.

This works even if the app isn’t installed, returning where it would be installed in the default location.

source

pub fn app_owner(&self) -> SteamId

Returns the steam id of the original owner of the app.

Differs from the current user if the app is borrowed.

source

pub fn available_game_languages(&self) -> Vec<String>

Returns a list of languages that the current app supports.

source

pub fn current_game_language(&self) -> String

Returns the language the user has set for the current game.

If the language hasn’t been set this returns the language used for the steam UI.

source

pub fn current_beta_name(&self) -> Option<String>

Returns the current beta name if any.

If the user isn’t playing on a beta branch then this returns None

source

pub fn launch_command_line(&self) -> String

Returns the command line if the game was launched via Steam URL

If the game was not launched through Steam URL, this returns an empty string.

See Steam API

Auto Trait Implementations§

§

impl<Manager> RefUnwindSafe for Apps<Manager>
where Manager: RefUnwindSafe,

§

impl<Manager> !Send for Apps<Manager>

§

impl<Manager> !Sync for Apps<Manager>

§

impl<Manager> Unpin for Apps<Manager>

§

impl<Manager> UnwindSafe for Apps<Manager>
where Manager: RefUnwindSafe,

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.