#[non_exhaustive]pub struct MatchmakingTicketBuilder { /* private fields */ }
Expand description
A builder for MatchmakingTicket
.
Implementations§
Source§impl MatchmakingTicketBuilder
impl MatchmakingTicketBuilder
Sourcepub fn ticket_id(self, input: impl Into<String>) -> Self
pub fn ticket_id(self, input: impl Into<String>) -> Self
A unique identifier for a matchmaking ticket.
Sourcepub fn set_ticket_id(self, input: Option<String>) -> Self
pub fn set_ticket_id(self, input: Option<String>) -> Self
A unique identifier for a matchmaking ticket.
Sourcepub fn get_ticket_id(&self) -> &Option<String>
pub fn get_ticket_id(&self) -> &Option<String>
A unique identifier for a matchmaking ticket.
Sourcepub fn configuration_name(self, input: impl Into<String>) -> Self
pub fn configuration_name(self, input: impl Into<String>) -> Self
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.
Sourcepub fn set_configuration_name(self, input: Option<String>) -> Self
pub fn set_configuration_name(self, input: Option<String>) -> Self
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.
Sourcepub fn get_configuration_name(&self) -> &Option<String>
pub fn get_configuration_name(&self) -> &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.
Sourcepub fn configuration_arn(self, input: impl Into<String>) -> Self
pub fn configuration_arn(self, input: impl Into<String>) -> Self
The Amazon Resource Name (ARN) associated with the GameLift matchmaking configuration resource that is used with this ticket.
Sourcepub fn set_configuration_arn(self, input: Option<String>) -> Self
pub fn set_configuration_arn(self, input: Option<String>) -> Self
The Amazon Resource Name (ARN) associated with the GameLift matchmaking configuration resource that is used with this ticket.
Sourcepub fn get_configuration_arn(&self) -> &Option<String>
pub fn get_configuration_arn(&self) -> &Option<String>
The Amazon Resource Name (ARN) associated with the GameLift matchmaking configuration resource that is used with this ticket.
Sourcepub fn status(self, input: MatchmakingConfigurationStatus) -> Self
pub fn status(self, input: MatchmakingConfigurationStatus) -> Self
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.
Sourcepub fn set_status(self, input: Option<MatchmakingConfigurationStatus>) -> Self
pub fn set_status(self, input: Option<MatchmakingConfigurationStatus>) -> Self
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.
Sourcepub fn get_status(&self) -> &Option<MatchmakingConfigurationStatus>
pub fn get_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.
Sourcepub fn status_reason(self, input: impl Into<String>) -> Self
pub fn status_reason(self, input: impl Into<String>) -> Self
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.
Sourcepub fn set_status_reason(self, input: Option<String>) -> Self
pub fn set_status_reason(self, input: Option<String>) -> Self
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.
Sourcepub fn get_status_reason(&self) -> &Option<String>
pub fn get_status_reason(&self) -> &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.
Sourcepub fn status_message(self, input: impl Into<String>) -> Self
pub fn status_message(self, input: impl Into<String>) -> Self
Additional information about the current status.
Sourcepub fn set_status_message(self, input: Option<String>) -> Self
pub fn set_status_message(self, input: Option<String>) -> Self
Additional information about the current status.
Sourcepub fn get_status_message(&self) -> &Option<String>
pub fn get_status_message(&self) -> &Option<String>
Additional information about the current status.
Sourcepub fn start_time(self, input: DateTime) -> Self
pub fn start_time(self, input: DateTime) -> Self
Time stamp indicating when this matchmaking request was received. Format is a number expressed in Unix time as milliseconds (for example "1469498468.057"
).
Sourcepub fn set_start_time(self, input: Option<DateTime>) -> Self
pub fn set_start_time(self, input: Option<DateTime>) -> Self
Time stamp indicating when this matchmaking request was received. Format is a number expressed in Unix time as milliseconds (for example "1469498468.057"
).
Sourcepub fn get_start_time(&self) -> &Option<DateTime>
pub fn get_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"
).
Sourcepub fn end_time(self, input: DateTime) -> Self
pub fn end_time(self, input: DateTime) -> Self
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"
).
Sourcepub fn set_end_time(self, input: Option<DateTime>) -> Self
pub fn set_end_time(self, input: Option<DateTime>) -> Self
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"
).
Sourcepub fn get_end_time(&self) -> &Option<DateTime>
pub fn get_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"
).
Sourcepub fn players(self, input: Player) -> Self
pub fn players(self, input: Player) -> Self
Appends an item to players
.
To override the contents of this collection use set_players
.
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.
Sourcepub fn set_players(self, input: Option<Vec<Player>>) -> Self
pub fn set_players(self, input: Option<Vec<Player>>) -> Self
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.
Sourcepub fn get_players(&self) -> &Option<Vec<Player>>
pub fn get_players(&self) -> &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.
Sourcepub fn game_session_connection_info(
self,
input: GameSessionConnectionInfo,
) -> Self
pub fn game_session_connection_info( self, input: GameSessionConnectionInfo, ) -> Self
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 .
Sourcepub fn set_game_session_connection_info(
self,
input: Option<GameSessionConnectionInfo>,
) -> Self
pub fn set_game_session_connection_info( self, input: Option<GameSessionConnectionInfo>, ) -> Self
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 .
Sourcepub fn get_game_session_connection_info(
&self,
) -> &Option<GameSessionConnectionInfo>
pub fn get_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 .
Sourcepub fn estimated_wait_time(self, input: i32) -> Self
pub fn estimated_wait_time(self, input: i32) -> Self
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.
Sourcepub fn set_estimated_wait_time(self, input: Option<i32>) -> Self
pub fn set_estimated_wait_time(self, input: Option<i32>) -> Self
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.
Sourcepub fn get_estimated_wait_time(&self) -> &Option<i32>
pub fn get_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.
Sourcepub fn build(self) -> MatchmakingTicket
pub fn build(self) -> MatchmakingTicket
Consumes the builder and constructs a MatchmakingTicket
.
Trait Implementations§
Source§impl Clone for MatchmakingTicketBuilder
impl Clone for MatchmakingTicketBuilder
Source§fn clone(&self) -> MatchmakingTicketBuilder
fn clone(&self) -> MatchmakingTicketBuilder
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for MatchmakingTicketBuilder
impl Debug for MatchmakingTicketBuilder
Source§impl Default for MatchmakingTicketBuilder
impl Default for MatchmakingTicketBuilder
Source§fn default() -> MatchmakingTicketBuilder
fn default() -> MatchmakingTicketBuilder
Source§impl PartialEq for MatchmakingTicketBuilder
impl PartialEq for MatchmakingTicketBuilder
impl StructuralPartialEq for MatchmakingTicketBuilder
Auto Trait Implementations§
impl Freeze for MatchmakingTicketBuilder
impl RefUnwindSafe for MatchmakingTicketBuilder
impl Send for MatchmakingTicketBuilder
impl Sync for MatchmakingTicketBuilder
impl Unpin for MatchmakingTicketBuilder
impl UnwindSafe for MatchmakingTicketBuilder
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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 moreSource§impl<T> Paint for Twhere
T: ?Sized,
impl<T> Paint for Twhere
T: ?Sized,
Source§fn fg(&self, value: Color) -> Painted<&T>
fn fg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self
with the foreground set to
value
.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like red()
and
green()
, which have the same functionality but are
pithier.
§Example
Set foreground color to white using fg()
:
use yansi::{Paint, Color};
painted.fg(Color::White);
Set foreground color to white using white()
.
use yansi::Paint;
painted.white();
Source§fn bright_black(&self) -> Painted<&T>
fn bright_black(&self) -> Painted<&T>
Source§fn bright_red(&self) -> Painted<&T>
fn bright_red(&self) -> Painted<&T>
Source§fn bright_green(&self) -> Painted<&T>
fn bright_green(&self) -> Painted<&T>
Source§fn bright_yellow(&self) -> Painted<&T>
fn bright_yellow(&self) -> Painted<&T>
Source§fn bright_blue(&self) -> Painted<&T>
fn bright_blue(&self) -> Painted<&T>
Source§fn bright_magenta(&self) -> Painted<&T>
fn bright_magenta(&self) -> Painted<&T>
Source§fn bright_cyan(&self) -> Painted<&T>
fn bright_cyan(&self) -> Painted<&T>
Source§fn bright_white(&self) -> Painted<&T>
fn bright_white(&self) -> Painted<&T>
Source§fn bg(&self, value: Color) -> Painted<&T>
fn bg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self
with the background set to
value
.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like on_red()
and
on_green()
, which have the same functionality but
are pithier.
§Example
Set background color to red using fg()
:
use yansi::{Paint, Color};
painted.bg(Color::Red);
Set background color to red using on_red()
.
use yansi::Paint;
painted.on_red();
Source§fn on_primary(&self) -> Painted<&T>
fn on_primary(&self) -> Painted<&T>
Source§fn on_magenta(&self) -> Painted<&T>
fn on_magenta(&self) -> Painted<&T>
Source§fn on_bright_black(&self) -> Painted<&T>
fn on_bright_black(&self) -> Painted<&T>
Source§fn on_bright_red(&self) -> Painted<&T>
fn on_bright_red(&self) -> Painted<&T>
Source§fn on_bright_green(&self) -> Painted<&T>
fn on_bright_green(&self) -> Painted<&T>
Source§fn on_bright_yellow(&self) -> Painted<&T>
fn on_bright_yellow(&self) -> Painted<&T>
Source§fn on_bright_blue(&self) -> Painted<&T>
fn on_bright_blue(&self) -> Painted<&T>
Source§fn on_bright_magenta(&self) -> Painted<&T>
fn on_bright_magenta(&self) -> Painted<&T>
Source§fn on_bright_cyan(&self) -> Painted<&T>
fn on_bright_cyan(&self) -> Painted<&T>
Source§fn on_bright_white(&self) -> Painted<&T>
fn on_bright_white(&self) -> Painted<&T>
Source§fn attr(&self, value: Attribute) -> Painted<&T>
fn attr(&self, value: Attribute) -> Painted<&T>
Enables the styling Attribute
value
.
This method should be used rarely. Instead, prefer to use
attribute-specific builder methods like bold()
and
underline()
, which have the same functionality
but are pithier.
§Example
Make text bold using attr()
:
use yansi::{Paint, Attribute};
painted.attr(Attribute::Bold);
Make text bold using using bold()
.
use yansi::Paint;
painted.bold();
Source§fn rapid_blink(&self) -> Painted<&T>
fn rapid_blink(&self) -> Painted<&T>
Source§fn quirk(&self, value: Quirk) -> Painted<&T>
fn quirk(&self, value: Quirk) -> Painted<&T>
Enables the yansi
Quirk
value
.
This method should be used rarely. Instead, prefer to use quirk-specific
builder methods like mask()
and
wrap()
, which have the same functionality but are
pithier.
§Example
Enable wrapping using .quirk()
:
use yansi::{Paint, Quirk};
painted.quirk(Quirk::Wrap);
Enable wrapping using wrap()
.
use yansi::Paint;
painted.wrap();
Source§fn clear(&self) -> Painted<&T>
👎Deprecated since 1.0.1: renamed to resetting()
due to conflicts with Vec::clear()
.
The clear()
method will be removed in a future release.
fn clear(&self) -> Painted<&T>
resetting()
due to conflicts with Vec::clear()
.
The clear()
method will be removed in a future release.Source§fn whenever(&self, value: Condition) -> Painted<&T>
fn whenever(&self, value: Condition) -> Painted<&T>
Conditionally enable styling based on whether the Condition
value
applies. Replaces any previous condition.
See the crate level docs for more details.
§Example
Enable styling painted
only when both stdout
and stderr
are TTYs:
use yansi::{Paint, Condition};
painted.red().on_yellow().whenever(Condition::STDOUTERR_ARE_TTY);