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.
Methods
impl Client<ClientManager>
[src]
fn init() -> SResult<Client<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]
fn run_callbacks(&self)
[src]
Runs any currently pending callbacks
This runs all currently pending callbacks on the current thread.
This should be called frequently (e.g. once per a frame) in order to reduce the latency between recieving events.
fn register_callback<C, F>(&self, f: F) where
C: Callback,
F: FnMut(C) + 'static + Send + Sync,
[src]
C: Callback,
F: FnMut(C) + 'static + Send + Sync,
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.
fn utils(&self) -> Utils<Manager>
[src]
Returns an accessor to the steam utils interface
fn matchmaking(&self) -> Matchmaking<Manager>
[src]
Returns an accessor to the steam matchmaking interface
fn apps(&self) -> Apps<Manager>
[src]
Returns an accessor to the steam apps interface
fn friends(&self) -> Friends<Manager>
[src]
Returns an accessor to the steam friends interface
fn user(&self) -> User<Manager>
[src]
Returns an accessor to the steam user interface
Trait Implementations
impl<Manager> Clone for Client<Manager>
[src]
fn clone(&self) -> Self
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more