Client

Struct Client 

Source
pub struct Client(/* private fields */);
Expand description

A Bevy compatible wrapper around steamworks::Client.

Automatically dereferences to the client so it can be transparently used.

For more information on how to use it, see steamworks::Client.

Methods from Deref<Target = Client>§

Source

pub fn run_callbacks(&self)

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.

Source

pub fn process_callbacks(&self, callback_handler: impl FnMut(CallbackResult))

Runs any currently pending callbacks.

This is identical to run_callbacks in every way, except that callback_handler is called for every callback invoked.

This option provides an alternative for handling callbacks that can doesn’t require the handler to be Send, and 'static.

This should be called frequently (e.g. once per a frame) in order to reduce the latency between recieving events.

Source

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

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.

If the callback handler cannot be made Send or 'static the call to run_callbacks should be replaced with a call to process_callbacks instead.

Source

pub fn utils(&self) -> Utils

Returns an accessor to the steam utils interface

Source

pub fn matchmaking(&self) -> Matchmaking

Returns an accessor to the steam matchmaking interface

Source

pub fn matchmaking_servers(&self) -> MatchmakingServers

Returns an accessor to the steam matchmaking_servers interface

Source

pub fn networking(&self) -> Networking

Returns an accessor to the steam networking interface

Source

pub fn apps(&self) -> Apps

Returns an accessor to the steam apps interface

Source

pub fn friends(&self) -> Friends

Returns an accessor to the steam friends interface

Source

pub fn input(&self) -> Input

Returns an accessor to the steam input interface

Source

pub fn user(&self) -> User

Returns an accessor to the steam user interface

Source

pub fn user_stats(&self) -> UserStats

Returns an accessor to the steam user stats interface

Source

pub fn remote_play(&self) -> RemotePlay

Returns an accessor to the steam remote play interface

Source

pub fn remote_storage(&self) -> RemoteStorage

Returns an accessor to the steam remote storage interface

Source

pub fn screenshots(&self) -> Screenshots

Returns an accessor to the steam screenshots interface

Source

pub fn ugc(&self) -> UGC

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

Source

pub fn timeline(&self) -> Timeline

Returns an accessor to the steam timeline interface

Source

pub fn networking_messages(&self) -> NetworkingMessages

Source

pub fn networking_sockets(&self) -> NetworkingSockets

Source

pub fn networking_utils(&self) -> NetworkingUtils

Trait Implementations§

Source§

impl Clone for Client

Source§

fn clone(&self) -> Client

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Deref for Client

Source§

type Target = Client

The resulting type after dereferencing.
Source§

fn deref(&self) -> &Self::Target

Dereferences the value.
Source§

impl Resource for Client
where Self: Send + Sync + 'static,

Auto Trait Implementations§

§

impl Freeze for Client

§

impl RefUnwindSafe for Client

§

impl Send for Client

§

impl Sync for Client

§

impl Unpin for Client

§

impl UnwindSafe for Client

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> Downcast for T
where T: Any,

Source§

fn into_any(self: Box<T>) -> Box<dyn Any>

Converts Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.
Source§

fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>

Converts Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further downcast into Rc<ConcreteType> where ConcreteType implements Trait.
Source§

fn as_any(&self) -> &(dyn Any + 'static)

Converts &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &Any’s vtable from &Trait’s.
Source§

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

Converts &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s.
Source§

impl<T> DowncastSend for T
where T: Any + Send,

Source§

fn into_any_send(self: Box<T>) -> Box<dyn Any + Send>

Converts Box<Trait> (where Trait: DowncastSend) to Box<dyn Any + Send>, which can then be downcast into Box<ConcreteType> where ConcreteType implements Trait.
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> IntoResult<T> for T

Source§

fn into_result(self) -> Result<T, RunSystemError>

Converts this type into the system output type.
Source§

impl<P, T> Receiver for P
where P: Deref<Target = T> + ?Sized, T: ?Sized,

Source§

type Target = T

🔬This is a nightly-only experimental API. (arbitrary_self_types)
The target type on which the method may be called.
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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<T> ConditionalSend for T
where T: Send,