UserInfo

Struct UserInfo 

Source
pub struct UserInfo<'a> {
    pub account_name: Option<&'a str>,
    pub join_time: u64,
    pub role: UserRole,
    pub subgroup: u8,
    pub ready_status: bool,
}

Fields§

§account_name: Option<&'a str>

Account name, without leading ‘:’.

§join_time: u64

Unix timestamp when the user joined the squad (or 0 if time could not be determined)

§role: UserRole

Role in squad, or UserRole::None if the user was removed from the squad

§subgroup: u8

Subgroup the user is in (0 when no subgroup could be found, which is either the first subgroup or no subgroup)

§ready_status: bool

Whether this player is ready or not (in a squad ready check).

§Remarks

role == UserRole::SquadLeader and ready_status == true implies that a ready check was just started. Similarly, role == UserRole::SquadLeader and ready_status == false implies that a ready check either finished or was cancelled. If everyone in the squad had an event sent with ready_status == true then that means that the ready check finished successfully (after which there will be events sent for each user where their ready_status == false)

Trait Implementations§

Source§

impl<'a> Debug for UserInfo<'a>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl From<UserInfo<'_>> for UserInfoOwned

Source§

fn from(user: UserInfo<'_>) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

§

impl<'a> Freeze for UserInfo<'a>

§

impl<'a> RefUnwindSafe for UserInfo<'a>

§

impl<'a> Send for UserInfo<'a>

§

impl<'a> Sync for UserInfo<'a>

§

impl<'a> Unpin for UserInfo<'a>

§

impl<'a> UnwindSafe for UserInfo<'a>

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>,

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.