#[non_exhaustive]pub struct GameSessionPlacement {Show 19 fields
pub placement_id: Option<String>,
pub game_session_queue_name: Option<String>,
pub status: Option<GameSessionPlacementState>,
pub game_properties: Option<Vec<GameProperty>>,
pub maximum_player_session_count: Option<i32>,
pub game_session_name: Option<String>,
pub game_session_id: Option<String>,
pub game_session_arn: Option<String>,
pub game_session_region: Option<String>,
pub player_latencies: Option<Vec<PlayerLatency>>,
pub start_time: Option<DateTime>,
pub end_time: Option<DateTime>,
pub ip_address: Option<String>,
pub dns_name: Option<String>,
pub port: Option<i32>,
pub placed_player_sessions: Option<Vec<PlacedPlayerSession>>,
pub game_session_data: Option<String>,
pub matchmaker_data: Option<String>,
pub priority_configuration_override: Option<PriorityConfigurationOverride>,
}
Expand description
Represents a potential game session placement, including the full details of the original placement request and the current status.
If the game session placement status is PENDING
, the properties for game session ID/ARN, region, IP address/DNS, and port aren't final. A game session is not active and ready to accept players until placement status reaches FULFILLED
. When the placement is in PENDING
status, Amazon GameLift Servers may attempt to place a game session multiple times before succeeding. With each attempt it creates a https://docs.aws.amazon.com/gamelift/latest/apireference/API_GameSession object and updates this placement object with the new game session properties.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.placement_id: Option<String>
A unique identifier for a game session placement.
game_session_queue_name: Option<String>
A descriptive label that is associated with game session queue. Queue names must be unique within each Region.
status: Option<GameSessionPlacementState>
Current status of the game session placement request.
-
PENDING -- The placement request is in the queue waiting to be processed. Game session properties are not yet final.
-
FULFILLED -- A new game session has been successfully placed. Game session properties are now final.
-
CANCELLED -- The placement request was canceled.
-
TIMED_OUT -- A new game session was not successfully created before the time limit expired. You can resubmit the placement request as needed.
-
FAILED -- Amazon GameLift Servers is not able to complete the process of placing the game session. Common reasons are the game session terminated before the placement process was completed, or an unexpected internal error.
game_properties: Option<Vec<GameProperty>>
A set of key-value pairs that can store custom data in a game session. For example: {"Key": "difficulty", "Value": "novice"}
.
maximum_player_session_count: Option<i32>
The maximum number of players that can be connected simultaneously to the game session.
game_session_name: Option<String>
A descriptive label that is associated with a game session. Session names do not need to be unique.
game_session_id: Option<String>
A unique identifier for the game session. This value isn't final until placement status is FULFILLED
.
game_session_arn: Option<String>
Identifier for the game session created by this placement request. This identifier is unique across all Regions. This value isn't final until placement status is FULFILLED
.
game_session_region: Option<String>
Name of the Region where the game session created by this placement request is running. This value isn't final until placement status is FULFILLED
.
player_latencies: Option<Vec<PlayerLatency>>
A set of values, expressed in milliseconds, that indicates the amount of latency that a player experiences when connected to Amazon Web Services Regions.
start_time: Option<DateTime>
Time stamp indicating when this request was placed in the queue. Format is a number expressed in Unix time as milliseconds (for example "1469498468.057"
).
end_time: Option<DateTime>
Time stamp indicating when this request was completed, canceled, or timed out.
ip_address: Option<String>
The IP address of the game session. To connect to a Amazon GameLift Servers game server, an app needs both the IP address and port number. This value isn't final until placement status is FULFILLED
.
dns_name: Option<String>
The DNS identifier assigned to the instance that is running the game session. Values have the following format:
-
TLS-enabled fleets:
.. .amazongamelift.com -
Non-TLS-enabled fleets:
ec2-
. (See Amazon EC2 Instance IP Addressing.).compute.amazonaws.com
When connecting to a game session that is running on a TLS-enabled fleet, you must use the DNS name, not the IP address.
port: Option<i32>
The port number for the game session. To connect to a Amazon GameLift Servers game server, an app needs both the IP address and port number. This value isn't final until placement status is FULFILLED
.
placed_player_sessions: Option<Vec<PlacedPlayerSession>>
A collection of information on player sessions created in response to the game session placement request. These player sessions are created only after a new game session is successfully placed (placement status is FULFILLED
). This information includes the player ID, provided in the placement request, and a corresponding player session ID.
game_session_data: Option<String>
A set of custom game session properties, formatted as a single string value. This data is passed to a game server process with a request to start a new game session. For more information, see Start a game session.
matchmaker_data: Option<String>
Information on the matchmaking process for this game. Data is in JSON syntax, formatted as a string. It identifies the matchmaking configuration used to create the match, and contains data on all players assigned to the match, including player attributes and team assignments. For more details on matchmaker data, see Match Data.
priority_configuration_override: Option<PriorityConfigurationOverride>
An alternative priority list of locations that's included with a game session placement request. When provided, the list overrides a queue's location order list for this game session placement request only. The list might include Amazon Web Services Regions, local zones, and custom locations (for Anywhere fleets). The fallback strategy tells Amazon GameLift Servers what action to take (if any) in the event that it failed to place a new game session.
Implementations§
Source§impl GameSessionPlacement
impl GameSessionPlacement
Sourcepub fn placement_id(&self) -> Option<&str>
pub fn placement_id(&self) -> Option<&str>
A unique identifier for a game session placement.
Sourcepub fn game_session_queue_name(&self) -> Option<&str>
pub fn game_session_queue_name(&self) -> Option<&str>
A descriptive label that is associated with game session queue. Queue names must be unique within each Region.
Sourcepub fn status(&self) -> Option<&GameSessionPlacementState>
pub fn status(&self) -> Option<&GameSessionPlacementState>
Current status of the game session placement request.
-
PENDING -- The placement request is in the queue waiting to be processed. Game session properties are not yet final.
-
FULFILLED -- A new game session has been successfully placed. Game session properties are now final.
-
CANCELLED -- The placement request was canceled.
-
TIMED_OUT -- A new game session was not successfully created before the time limit expired. You can resubmit the placement request as needed.
-
FAILED -- Amazon GameLift Servers is not able to complete the process of placing the game session. Common reasons are the game session terminated before the placement process was completed, or an unexpected internal error.
Sourcepub fn game_properties(&self) -> &[GameProperty]
pub fn game_properties(&self) -> &[GameProperty]
A set of key-value pairs that can store custom data in a game session. For example: {"Key": "difficulty", "Value": "novice"}
.
If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use .game_properties.is_none()
.
Sourcepub fn maximum_player_session_count(&self) -> Option<i32>
pub fn maximum_player_session_count(&self) -> Option<i32>
The maximum number of players that can be connected simultaneously to the game session.
Sourcepub fn game_session_name(&self) -> Option<&str>
pub fn game_session_name(&self) -> Option<&str>
A descriptive label that is associated with a game session. Session names do not need to be unique.
Sourcepub fn game_session_id(&self) -> Option<&str>
pub fn game_session_id(&self) -> Option<&str>
A unique identifier for the game session. This value isn't final until placement status is FULFILLED
.
Sourcepub fn game_session_arn(&self) -> Option<&str>
pub fn game_session_arn(&self) -> Option<&str>
Identifier for the game session created by this placement request. This identifier is unique across all Regions. This value isn't final until placement status is FULFILLED
.
Sourcepub fn game_session_region(&self) -> Option<&str>
pub fn game_session_region(&self) -> Option<&str>
Name of the Region where the game session created by this placement request is running. This value isn't final until placement status is FULFILLED
.
Sourcepub fn player_latencies(&self) -> &[PlayerLatency]
pub fn player_latencies(&self) -> &[PlayerLatency]
A set of values, expressed in milliseconds, that indicates the amount of latency that a player experiences when connected to Amazon Web Services Regions.
If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use .player_latencies.is_none()
.
Sourcepub fn start_time(&self) -> Option<&DateTime>
pub fn start_time(&self) -> Option<&DateTime>
Time stamp indicating when this request was placed in the queue. Format is a number expressed in Unix time as milliseconds (for example "1469498468.057"
).
Sourcepub fn end_time(&self) -> Option<&DateTime>
pub fn end_time(&self) -> Option<&DateTime>
Time stamp indicating when this request was completed, canceled, or timed out.
Sourcepub fn ip_address(&self) -> Option<&str>
pub fn ip_address(&self) -> Option<&str>
The IP address of the game session. To connect to a Amazon GameLift Servers game server, an app needs both the IP address and port number. This value isn't final until placement status is FULFILLED
.
Sourcepub fn dns_name(&self) -> Option<&str>
pub fn dns_name(&self) -> Option<&str>
The DNS identifier assigned to the instance that is running the game session. Values have the following format:
-
TLS-enabled fleets:
.. .amazongamelift.com -
Non-TLS-enabled fleets:
ec2-
. (See Amazon EC2 Instance IP Addressing.).compute.amazonaws.com
When connecting to a game session that is running on a TLS-enabled fleet, you must use the DNS name, not the IP address.
Sourcepub fn port(&self) -> Option<i32>
pub fn port(&self) -> Option<i32>
The port number for the game session. To connect to a Amazon GameLift Servers game server, an app needs both the IP address and port number. This value isn't final until placement status is FULFILLED
.
Sourcepub fn placed_player_sessions(&self) -> &[PlacedPlayerSession]
pub fn placed_player_sessions(&self) -> &[PlacedPlayerSession]
A collection of information on player sessions created in response to the game session placement request. These player sessions are created only after a new game session is successfully placed (placement status is FULFILLED
). This information includes the player ID, provided in the placement request, and a corresponding player session ID.
If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use .placed_player_sessions.is_none()
.
Sourcepub fn game_session_data(&self) -> Option<&str>
pub fn game_session_data(&self) -> Option<&str>
A set of custom game session properties, formatted as a single string value. This data is passed to a game server process with a request to start a new game session. For more information, see Start a game session.
Sourcepub fn matchmaker_data(&self) -> Option<&str>
pub fn matchmaker_data(&self) -> Option<&str>
Information on the matchmaking process for this game. Data is in JSON syntax, formatted as a string. It identifies the matchmaking configuration used to create the match, and contains data on all players assigned to the match, including player attributes and team assignments. For more details on matchmaker data, see Match Data.
Sourcepub fn priority_configuration_override(
&self,
) -> Option<&PriorityConfigurationOverride>
pub fn priority_configuration_override( &self, ) -> Option<&PriorityConfigurationOverride>
An alternative priority list of locations that's included with a game session placement request. When provided, the list overrides a queue's location order list for this game session placement request only. The list might include Amazon Web Services Regions, local zones, and custom locations (for Anywhere fleets). The fallback strategy tells Amazon GameLift Servers what action to take (if any) in the event that it failed to place a new game session.
Source§impl GameSessionPlacement
impl GameSessionPlacement
Sourcepub fn builder() -> GameSessionPlacementBuilder
pub fn builder() -> GameSessionPlacementBuilder
Creates a new builder-style object to manufacture GameSessionPlacement
.
Trait Implementations§
Source§impl Clone for GameSessionPlacement
impl Clone for GameSessionPlacement
Source§fn clone(&self) -> GameSessionPlacement
fn clone(&self) -> GameSessionPlacement
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for GameSessionPlacement
impl Debug for GameSessionPlacement
Source§impl PartialEq for GameSessionPlacement
impl PartialEq for GameSessionPlacement
impl StructuralPartialEq for GameSessionPlacement
Auto Trait Implementations§
impl Freeze for GameSessionPlacement
impl RefUnwindSafe for GameSessionPlacement
impl Send for GameSessionPlacement
impl Sync for GameSessionPlacement
impl Unpin for GameSessionPlacement
impl UnwindSafe for GameSessionPlacement
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);