Struct bevy_steamworks::Friend
source · pub struct Friend<Manager> { /* private fields */ }
Implementations§
source§impl<Manager> Friend<Manager>
impl<Manager> Friend<Manager>
pub fn id(&self) -> SteamId
pub fn name(&self) -> String
sourcepub fn nick_name(&self) -> Option<String>
pub fn nick_name(&self) -> Option<String>
Gets the nickname that the current user has set for the specified user.
pub fn state(&self) -> FriendState
sourcepub fn game_played(&self) -> Option<FriendGame>
pub fn game_played(&self) -> Option<FriendGame>
Returns information about the game the player is current playing if any
sourcepub fn coplay_game_played(&self) -> AppId
pub fn coplay_game_played(&self) -> AppId
Gets the app ID of the game that user played with someone on their recently-played-with list.
sourcepub fn coplay_time(&self) -> i32
pub fn coplay_time(&self) -> i32
Gets the timestamp of when the user played with someone on their recently-played-with list.
sourcepub fn small_avatar(&self) -> Option<Vec<u8>>
pub fn small_avatar(&self) -> Option<Vec<u8>>
Returns a small (32x32) avatar for the user in RGBA format
sourcepub fn medium_avatar(&self) -> Option<Vec<u8>>
pub fn medium_avatar(&self) -> Option<Vec<u8>>
Returns a medium (64x64) avatar for the user in RGBA format
sourcepub fn large_avatar(&self) -> Option<Vec<u8>>
pub fn large_avatar(&self) -> Option<Vec<u8>>
Returns a large (184x184) avatar for the user in RGBA format
sourcepub fn has_friend(&self, flags: FriendFlags) -> bool
pub fn has_friend(&self, flags: FriendFlags) -> bool
Checks if the user meets the specified criteria. (Friends, blocked, users on the same server, etc)
sourcepub fn invite_user_to_game(&self, connect_string: &str)
pub fn invite_user_to_game(&self, connect_string: &str)
Invites a friend or clan member to the current game using a special invite string. If the target user accepts the invite then the ConnectString gets added to the command-line when launching the game. If the game is already running for that user, then they will receive a GameRichPresenceJoinRequested_t callback with the connect string.
sourcepub fn set_played_with(&self)
pub fn set_played_with(&self)
Mark a target user as ‘played with’. NOTE: The current user must be in game with the other player for the association to work.
Trait Implementations§
Auto Trait Implementations§
impl<Manager> RefUnwindSafe for Friend<Manager>where
Manager: RefUnwindSafe,
impl<Manager> !Send for Friend<Manager>
impl<Manager> !Sync for Friend<Manager>
impl<Manager> Unpin for Friend<Manager>
impl<Manager> UnwindSafe for Friend<Manager>where
Manager: RefUnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.