Struct GGData

Source
pub struct GGData {
Show 13 fields pub current_user: Option<Box<GGUser>>, pub entrant: Option<Box<GGEntrant>>, pub event: Option<Box<GGEvent>>, pub participant: Option<Box<GGParticipant>>, pub phase: Option<Box<GGPhase>>, pub phase_group: Option<Box<GGPhaseGroup>>, pub player: Option<Box<GGPlayer>>, pub set: Option<Box<GGSet>>, pub tournament: Option<Box<GGTournament>>, pub tournaments: Option<Box<GGTournamentConnection>>, pub user: Option<Box<GGUser>>, pub videogame: Option<Box<GGVideogame>>, pub videogames: Option<Box<GGVideogameConnection>>,
}
Expand description

Equivalent for start.gg Query.

Each element in the structure is optional, allowing a user to only query values they want. Given each is an option and not a requirement, a method is included for each element with the same name. These methods will unwrap and return the proper value without any unwrapping or references needed. Certain methods (see tournaments()) will return a vector of the data type instead of a connection to a vector, done to simplify the API and make the start.gg api easier to work with.

Fields§

§current_user: Option<Box<GGUser>>§entrant: Option<Box<GGEntrant>>§event: Option<Box<GGEvent>>§participant: Option<Box<GGParticipant>>§phase: Option<Box<GGPhase>>§phase_group: Option<Box<GGPhaseGroup>>§player: Option<Box<GGPlayer>>§set: Option<Box<GGSet>>§tournament: Option<Box<GGTournament>>§tournaments: Option<Box<GGTournamentConnection>>§user: Option<Box<GGUser>>§videogame: Option<Box<GGVideogame>>§videogames: Option<Box<GGVideogameConnection>>

Implementations§

Source§

impl GGData

Source

pub fn current_user(&self) -> GGUser

Returns the current user.

Returns an empty user if not set or wasn’t queried.

Source

pub fn entrant(&self) -> GGEntrant

Returns the entrant.

Returns an empty entrant if not set or wasn’t queried.

Source

pub fn event(&self) -> GGEvent

Returns the event.

Returns an empty event if not set or wasn’t queried.

Source

pub fn participant(&self) -> GGParticipant

Returns the participant.

Returns an empty participant if not set or wasn’t queried.

Source

pub fn phase(&self) -> GGPhase

Returns the phase.

Returns an empty phase if not set or wasn’t queried.

Source

pub fn phase_group(&self) -> GGPhaseGroup

Returns the phase group.

Returns an empty phase group if not set or wasn’t queried.

Source

pub fn player(&self) -> GGPlayer

Returns the player.

Returns an empty player if not set or wasn’t queried.

Source

pub fn set(&self) -> GGSet

Returns the set.

Returns an empty set if not set or wasn’t queried.

Source

pub fn tournament(&self) -> GGTournament

Returns the tournament.

Returns an empty tournament if not set or wasn’t queried.

Source

pub fn tournaments(&self) -> Vec<GGTournament>

Returns a vector of tournaments.

Returns an empty vector if not set or wasn’t queried.

Source

pub fn user(&self) -> GGUser

Returns the user.

Returns an empty user if not set or wasn’t queried.

Source

pub fn videogame(&self) -> GGVideogame

Returns the videogame.

Returns an empty videogame if not set or wasn’t queried.

Source

pub fn videogames(&self) -> Vec<GGVideogame>

Returns a vector of videogames.

Returns an empty vector if not set or wasn’t queried.

Trait Implementations§

Source§

impl Clone for GGData

Source§

fn clone(&self) -> GGData

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<'de> Deserialize<'de> for GGData

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for GGData

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

§

impl Freeze for GGData

§

impl RefUnwindSafe for GGData

§

impl Send for GGData

§

impl Sync for GGData

§

impl Unpin for GGData

§

impl UnwindSafe for GGData

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> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
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> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> ErasedDestructor for T
where T: 'static,