Struct aws_sdk_gamelift::types::MatchmakingTicket

source ·
#[non_exhaustive]
pub struct MatchmakingTicket { pub ticket_id: Option<String>, pub configuration_name: Option<String>, pub configuration_arn: Option<String>, pub status: Option<MatchmakingConfigurationStatus>, pub status_reason: Option<String>, pub status_message: Option<String>, pub start_time: Option<DateTime>, pub end_time: Option<DateTime>, pub players: Option<Vec<Player>>, pub game_session_connection_info: Option<GameSessionConnectionInfo>, pub estimated_wait_time: Option<i32>, }
Expand description

Ticket generated to track the progress of a matchmaking request. Each ticket is uniquely identified by a ticket ID, supplied by the requester, when creating a matchmaking request.

Fields (Non-exhaustive)§

This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.
§ticket_id: Option<String>

A unique identifier for a matchmaking ticket.

§configuration_name: Option<String>

Name of the matchmaking configuration that is used with this ticket. Matchmaking configurations determine how players are grouped into a match and how a new game session is created for the match.

§configuration_arn: Option<String>

The Amazon Resource Name (ARN) associated with the GameLift matchmaking configuration resource that is used with this ticket.

§status: Option<MatchmakingConfigurationStatus>

Current status of the matchmaking request.

  • QUEUED -- The matchmaking request has been received and is currently waiting to be processed.

  • SEARCHING -- The matchmaking request is currently being processed.

  • REQUIRES_ACCEPTANCE -- A match has been proposed and the players must accept the match. This status is used only with requests that use a matchmaking configuration with a player acceptance requirement.

  • PLACING -- The FlexMatch engine has matched players and is in the process of placing a new game session for the match.

  • COMPLETED -- Players have been matched and a game session is ready to host the players. A ticket in this state contains the necessary connection information for players.

  • FAILED -- The matchmaking request was not completed.

  • CANCELLED -- The matchmaking request was canceled. This may be the result of a StopMatchmaking operation or a proposed match that one or more players failed to accept.

  • TIMED_OUT -- The matchmaking request was not successful within the duration specified in the matchmaking configuration.

Matchmaking requests that fail to successfully complete (statuses FAILED, CANCELLED, TIMED_OUT) can be resubmitted as new requests with new ticket IDs.

§status_reason: Option<String>

Code to explain the current status. For example, a status reason may indicate when a ticket has returned to SEARCHING status after a proposed match fails to receive player acceptances.

§status_message: Option<String>

Additional information about the current status.

§start_time: Option<DateTime>

Time stamp indicating when this matchmaking request was received. Format is a number expressed in Unix time as milliseconds (for example "1469498468.057").

§end_time: Option<DateTime>

Time stamp indicating when the matchmaking request stopped being processed due to successful completion, timeout, or cancellation. Format is a number expressed in Unix time as milliseconds (for example "1469498468.057").

§players: Option<Vec<Player>>

A set of Player objects, each representing a player to find matches for. Players are identified by a unique player ID and may include latency data for use during matchmaking. If the ticket is in status COMPLETED, the Player objects include the team the players were assigned to in the resulting match.

§game_session_connection_info: Option<GameSessionConnectionInfo>

Connection information for a new game session. Once a match is made, the FlexMatch engine creates a new game session for it. This information is added to the matchmaking ticket, which you can be retrieve by calling DescribeMatchmaking .

§estimated_wait_time: Option<i32>

Average amount of time (in seconds) that players are currently waiting for a match. If there is not enough recent data, this property may be empty.

Implementations§

source§

impl MatchmakingTicket

source

pub fn ticket_id(&self) -> Option<&str>

A unique identifier for a matchmaking ticket.

source

pub fn configuration_name(&self) -> Option<&str>

Name of the matchmaking configuration that is used with this ticket. Matchmaking configurations determine how players are grouped into a match and how a new game session is created for the match.

source

pub fn configuration_arn(&self) -> Option<&str>

The Amazon Resource Name (ARN) associated with the GameLift matchmaking configuration resource that is used with this ticket.

source

pub fn status(&self) -> Option<&MatchmakingConfigurationStatus>

Current status of the matchmaking request.

  • QUEUED -- The matchmaking request has been received and is currently waiting to be processed.

  • SEARCHING -- The matchmaking request is currently being processed.

  • REQUIRES_ACCEPTANCE -- A match has been proposed and the players must accept the match. This status is used only with requests that use a matchmaking configuration with a player acceptance requirement.

  • PLACING -- The FlexMatch engine has matched players and is in the process of placing a new game session for the match.

  • COMPLETED -- Players have been matched and a game session is ready to host the players. A ticket in this state contains the necessary connection information for players.

  • FAILED -- The matchmaking request was not completed.

  • CANCELLED -- The matchmaking request was canceled. This may be the result of a StopMatchmaking operation or a proposed match that one or more players failed to accept.

  • TIMED_OUT -- The matchmaking request was not successful within the duration specified in the matchmaking configuration.

Matchmaking requests that fail to successfully complete (statuses FAILED, CANCELLED, TIMED_OUT) can be resubmitted as new requests with new ticket IDs.

source

pub fn status_reason(&self) -> Option<&str>

Code to explain the current status. For example, a status reason may indicate when a ticket has returned to SEARCHING status after a proposed match fails to receive player acceptances.

source

pub fn status_message(&self) -> Option<&str>

Additional information about the current status.

source

pub fn start_time(&self) -> Option<&DateTime>

Time stamp indicating when this matchmaking request was received. Format is a number expressed in Unix time as milliseconds (for example "1469498468.057").

source

pub fn end_time(&self) -> Option<&DateTime>

Time stamp indicating when the matchmaking request stopped being processed due to successful completion, timeout, or cancellation. Format is a number expressed in Unix time as milliseconds (for example "1469498468.057").

source

pub fn players(&self) -> &[Player]

A set of Player objects, each representing a player to find matches for. Players are identified by a unique player ID and may include latency data for use during matchmaking. If the ticket is in status COMPLETED, the Player objects include the team the players were assigned to in the resulting match.

If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use .players.is_none().

source

pub fn game_session_connection_info(&self) -> Option<&GameSessionConnectionInfo>

Connection information for a new game session. Once a match is made, the FlexMatch engine creates a new game session for it. This information is added to the matchmaking ticket, which you can be retrieve by calling DescribeMatchmaking .

source

pub fn estimated_wait_time(&self) -> Option<i32>

Average amount of time (in seconds) that players are currently waiting for a match. If there is not enough recent data, this property may be empty.

source§

impl MatchmakingTicket

source

pub fn builder() -> MatchmakingTicketBuilder

Creates a new builder-style object to manufacture MatchmakingTicket.

Trait Implementations§

source§

impl Clone for MatchmakingTicket

source§

fn clone(&self) -> MatchmakingTicket

Returns a copy 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 Debug for MatchmakingTicket

source§

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

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

impl PartialEq for MatchmakingTicket

source§

fn eq(&self, other: &MatchmakingTicket) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl StructuralPartialEq for MatchmakingTicket

Auto Trait Implementations§

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

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
source§

impl<Unshared, Shared> IntoShared<Shared> for Unshared
where Shared: FromUnshared<Unshared>,

source§

fn into_shared(self) -> Shared

Creates a shared type from an unshared type.
source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

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

§

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

§

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

§

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