Struct steamworks::Client[][src]

pub struct Client<Manager = ClientManager> { /* fields omitted */ }

The main entry point into the steam client.

This provides access to all of the steamworks api that clients can use.

Implementations

impl Client<ClientManager>[src]

pub fn init() -> SResult<(Client<ClientManager>, SingleClient<ClientManager>)>[src]

Attempts to initialize the steamworks api and returns a client to access the rest of the api.

This should only ever have one instance per a program.

Errors

This can fail if:

  • The steam client isn’t running

  • The app ID of the game couldn’t be determined.

    If the game isn’t being run through steam this can be provided by placing a steam_appid.txt with the ID inside in the current working directory

  • The game isn’t running on the same user/level as the steam client

  • The user doesn’t own a license for the game.

  • The app ID isn’t completely set up.

impl<Manager> Client<Manager>[src]

pub fn register_callback<C, F>(&self, f: F) -> CallbackHandle<Manager> where
    C: Callback,
    F: FnMut(C) + 'static + Send
[src]

Registers the passed function as a callback for the given type.

The callback will be run on the thread that run_callbacks is called when the event arrives.

pub fn utils(&self) -> Utils<Manager>[src]

Returns an accessor to the steam utils interface

pub fn matchmaking(&self) -> Matchmaking<Manager>[src]

Returns an accessor to the steam matchmaking interface

pub fn networking(&self) -> Networking<Manager>[src]

Returns an accessor to the steam networking interface

pub fn apps(&self) -> Apps<Manager>[src]

Returns an accessor to the steam apps interface

pub fn friends(&self) -> Friends<Manager>[src]

Returns an accessor to the steam friends interface

pub fn user(&self) -> User<Manager>[src]

Returns an accessor to the steam user interface

pub fn user_stats(&self) -> UserStats<Manager>[src]

Returns an accessor to the steam user stats interface

pub fn remote_storage(&self) -> RemoteStorage<Manager>[src]

Returns an accessor to the steam remote storage interface

pub fn ugc(&self) -> UGC<Manager>[src]

Returns an accessor to the steam UGC interface (steam workshop)

Trait Implementations

impl<Manager> Clone for Client<Manager>[src]

impl<Manager: Send + Sync> Send for Client<Manager>[src]

impl<Manager: Send + Sync> Sync for Client<Manager>[src]

Auto Trait Implementations

impl<Manager> RefUnwindSafe for Client<Manager> where
    Manager: RefUnwindSafe

impl<Manager> Unpin for Client<Manager>

impl<Manager> UnwindSafe for Client<Manager> where
    Manager: RefUnwindSafe

Blanket Implementations

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

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

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

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

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

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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.

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.