#[non_exhaustive]pub struct LocationStateBuilder { /* private fields */ }Expand description
A builder for LocationState.
Implementations§
Source§impl LocationStateBuilder
impl LocationStateBuilder
Sourcepub fn location_name(self, input: impl Into<String>) -> Self
pub fn location_name(self, input: impl Into<String>) -> Self
A location's name. For example, us-east-1. For a complete list of locations that Amazon GameLift Streams supports, refer to Regions, quotas, and limitations in the Amazon GameLift Streams Developer Guide.
Sourcepub fn set_location_name(self, input: Option<String>) -> Self
pub fn set_location_name(self, input: Option<String>) -> Self
A location's name. For example, us-east-1. For a complete list of locations that Amazon GameLift Streams supports, refer to Regions, quotas, and limitations in the Amazon GameLift Streams Developer Guide.
Sourcepub fn get_location_name(&self) -> &Option<String>
pub fn get_location_name(&self) -> &Option<String>
A location's name. For example, us-east-1. For a complete list of locations that Amazon GameLift Streams supports, refer to Regions, quotas, and limitations in the Amazon GameLift Streams Developer Guide.
Sourcepub fn status(self, input: StreamGroupLocationStatus) -> Self
pub fn status(self, input: StreamGroupLocationStatus) -> Self
This value is set of locations, including their name, current status, and capacities.
A location can be in one of the following states:
-
ACTIVATING: Amazon GameLift Streams is preparing the location. You cannot stream from, scale the capacity of, or remove this location yet. -
ACTIVE: The location is provisioned with initial capacity. You can now stream from, scale the capacity of, or remove this location. -
ERROR: Amazon GameLift Streams failed to set up this location. TheStatusReasonfield describes the error. You can remove this location and try to add it again. -
REMOVING: Amazon GameLift Streams is working to remove this location. This will release all provisioned capacity for this location in this stream group.
Sourcepub fn set_status(self, input: Option<StreamGroupLocationStatus>) -> Self
pub fn set_status(self, input: Option<StreamGroupLocationStatus>) -> Self
This value is set of locations, including their name, current status, and capacities.
A location can be in one of the following states:
-
ACTIVATING: Amazon GameLift Streams is preparing the location. You cannot stream from, scale the capacity of, or remove this location yet. -
ACTIVE: The location is provisioned with initial capacity. You can now stream from, scale the capacity of, or remove this location. -
ERROR: Amazon GameLift Streams failed to set up this location. TheStatusReasonfield describes the error. You can remove this location and try to add it again. -
REMOVING: Amazon GameLift Streams is working to remove this location. This will release all provisioned capacity for this location in this stream group.
Sourcepub fn get_status(&self) -> &Option<StreamGroupLocationStatus>
pub fn get_status(&self) -> &Option<StreamGroupLocationStatus>
This value is set of locations, including their name, current status, and capacities.
A location can be in one of the following states:
-
ACTIVATING: Amazon GameLift Streams is preparing the location. You cannot stream from, scale the capacity of, or remove this location yet. -
ACTIVE: The location is provisioned with initial capacity. You can now stream from, scale the capacity of, or remove this location. -
ERROR: Amazon GameLift Streams failed to set up this location. TheStatusReasonfield describes the error. You can remove this location and try to add it again. -
REMOVING: Amazon GameLift Streams is working to remove this location. This will release all provisioned capacity for this location in this stream group.
Sourcepub fn always_on_capacity(self, input: i32) -> Self
pub fn always_on_capacity(self, input: i32) -> Self
The streaming capacity that is allocated and ready to handle stream requests without delay. You pay for this capacity whether it's in use or not. Best for quickest time from streaming request to streaming session. Default is 1 (2 for high stream classes) when creating a stream group or adding a location.
Sourcepub fn set_always_on_capacity(self, input: Option<i32>) -> Self
pub fn set_always_on_capacity(self, input: Option<i32>) -> Self
The streaming capacity that is allocated and ready to handle stream requests without delay. You pay for this capacity whether it's in use or not. Best for quickest time from streaming request to streaming session. Default is 1 (2 for high stream classes) when creating a stream group or adding a location.
Sourcepub fn get_always_on_capacity(&self) -> &Option<i32>
pub fn get_always_on_capacity(&self) -> &Option<i32>
The streaming capacity that is allocated and ready to handle stream requests without delay. You pay for this capacity whether it's in use or not. Best for quickest time from streaming request to streaming session. Default is 1 (2 for high stream classes) when creating a stream group or adding a location.
Sourcepub fn on_demand_capacity(self, input: i32) -> Self
pub fn on_demand_capacity(self, input: i32) -> Self
The streaming capacity that Amazon GameLift Streams can allocate in response to stream requests, and then de-allocate when the session has terminated. This offers a cost control measure at the expense of a greater startup time (typically under 5 minutes). Default is 0 when creating a stream group or adding a location.
Sourcepub fn set_on_demand_capacity(self, input: Option<i32>) -> Self
pub fn set_on_demand_capacity(self, input: Option<i32>) -> Self
The streaming capacity that Amazon GameLift Streams can allocate in response to stream requests, and then de-allocate when the session has terminated. This offers a cost control measure at the expense of a greater startup time (typically under 5 minutes). Default is 0 when creating a stream group or adding a location.
Sourcepub fn get_on_demand_capacity(&self) -> &Option<i32>
pub fn get_on_demand_capacity(&self) -> &Option<i32>
The streaming capacity that Amazon GameLift Streams can allocate in response to stream requests, and then de-allocate when the session has terminated. This offers a cost control measure at the expense of a greater startup time (typically under 5 minutes). Default is 0 when creating a stream group or adding a location.
Sourcepub fn requested_capacity(self, input: i32) -> Self
pub fn requested_capacity(self, input: i32) -> Self
This value is the always-on capacity that you most recently requested for a stream group. You request capacity separately for each location in a stream group. In response to an increase in requested capacity, Amazon GameLift Streams attempts to provision compute resources to make the stream group's allocated capacity meet requested capacity. When always-on capacity is decreased, it can take a few minutes to deprovision allocated capacity to match the requested capacity.
Sourcepub fn set_requested_capacity(self, input: Option<i32>) -> Self
pub fn set_requested_capacity(self, input: Option<i32>) -> Self
This value is the always-on capacity that you most recently requested for a stream group. You request capacity separately for each location in a stream group. In response to an increase in requested capacity, Amazon GameLift Streams attempts to provision compute resources to make the stream group's allocated capacity meet requested capacity. When always-on capacity is decreased, it can take a few minutes to deprovision allocated capacity to match the requested capacity.
Sourcepub fn get_requested_capacity(&self) -> &Option<i32>
pub fn get_requested_capacity(&self) -> &Option<i32>
This value is the always-on capacity that you most recently requested for a stream group. You request capacity separately for each location in a stream group. In response to an increase in requested capacity, Amazon GameLift Streams attempts to provision compute resources to make the stream group's allocated capacity meet requested capacity. When always-on capacity is decreased, it can take a few minutes to deprovision allocated capacity to match the requested capacity.
Sourcepub fn allocated_capacity(self, input: i32) -> Self
pub fn allocated_capacity(self, input: i32) -> Self
This value is the stream capacity that Amazon GameLift Streams has provisioned in a stream group that can respond immediately to stream requests. It includes resources that are currently streaming and resources that are idle and ready to respond to stream requests. You pay for this capacity whether it's in use or not. After making changes to capacity, it can take a few minutes for the allocated capacity count to reflect the change while compute resources are allocated or deallocated. Similarly, when allocated on-demand capacity is no longer needed, it can take a few minutes for Amazon GameLift Streams to spin down the allocated capacity.
Sourcepub fn set_allocated_capacity(self, input: Option<i32>) -> Self
pub fn set_allocated_capacity(self, input: Option<i32>) -> Self
This value is the stream capacity that Amazon GameLift Streams has provisioned in a stream group that can respond immediately to stream requests. It includes resources that are currently streaming and resources that are idle and ready to respond to stream requests. You pay for this capacity whether it's in use or not. After making changes to capacity, it can take a few minutes for the allocated capacity count to reflect the change while compute resources are allocated or deallocated. Similarly, when allocated on-demand capacity is no longer needed, it can take a few minutes for Amazon GameLift Streams to spin down the allocated capacity.
Sourcepub fn get_allocated_capacity(&self) -> &Option<i32>
pub fn get_allocated_capacity(&self) -> &Option<i32>
This value is the stream capacity that Amazon GameLift Streams has provisioned in a stream group that can respond immediately to stream requests. It includes resources that are currently streaming and resources that are idle and ready to respond to stream requests. You pay for this capacity whether it's in use or not. After making changes to capacity, it can take a few minutes for the allocated capacity count to reflect the change while compute resources are allocated or deallocated. Similarly, when allocated on-demand capacity is no longer needed, it can take a few minutes for Amazon GameLift Streams to spin down the allocated capacity.
Sourcepub fn idle_capacity(self, input: i32) -> Self
pub fn idle_capacity(self, input: i32) -> Self
This value is the amount of allocated capacity that is not currently streaming. It represents the stream group's ability to respond immediately to new stream requests with near-instant startup time.
Sourcepub fn set_idle_capacity(self, input: Option<i32>) -> Self
pub fn set_idle_capacity(self, input: Option<i32>) -> Self
This value is the amount of allocated capacity that is not currently streaming. It represents the stream group's ability to respond immediately to new stream requests with near-instant startup time.
Sourcepub fn get_idle_capacity(&self) -> &Option<i32>
pub fn get_idle_capacity(&self) -> &Option<i32>
This value is the amount of allocated capacity that is not currently streaming. It represents the stream group's ability to respond immediately to new stream requests with near-instant startup time.
Sourcepub fn build(self) -> LocationState
pub fn build(self) -> LocationState
Consumes the builder and constructs a LocationState.
Trait Implementations§
Source§impl Clone for LocationStateBuilder
impl Clone for LocationStateBuilder
Source§fn clone(&self) -> LocationStateBuilder
fn clone(&self) -> LocationStateBuilder
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for LocationStateBuilder
impl Debug for LocationStateBuilder
Source§impl Default for LocationStateBuilder
impl Default for LocationStateBuilder
Source§fn default() -> LocationStateBuilder
fn default() -> LocationStateBuilder
Source§impl PartialEq for LocationStateBuilder
impl PartialEq for LocationStateBuilder
impl StructuralPartialEq for LocationStateBuilder
Auto Trait Implementations§
impl Freeze for LocationStateBuilder
impl RefUnwindSafe for LocationStateBuilder
impl Send for LocationStateBuilder
impl Sync for LocationStateBuilder
impl Unpin for LocationStateBuilder
impl UnwindSafe for LocationStateBuilder
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);