Struct google_api_proto::google::maps::playablelocations::v3::sample::SpacingOptions
source · pub struct SpacingOptions {
pub min_spacing_meters: f64,
pub point_type: i32,
}
Expand description
A set of options that specifies the separation between playable locations.
Fields§
§min_spacing_meters: f64
Required. The minimum spacing between any two playable locations, measured in meters. The minimum value is 30. The maximum value is 1000.
Inputs will be rounded up to the next 10 meter interval.
The default value is 200m.
Set this field to remove tight clusters of playable locations.
Note:
The spacing is a greedy algorithm. It optimizes for selecting the highest ranking locations first, not to maximize the number of locations selected. Consider the following scenario:
- Rank: A: 2, B: 1, C: 3.
- Distance: A–200m–B–200m–C
If spacing=250, it will pick the highest ranked location [B], not [A, C].
Note:
Spacing works within the game object type itself, as well as the previous ones. Suppose three game object types, each with the following spacing:
- X: 400m, Y: undefined, Z: 200m.
- Add locations for X, within 400m of each other.
- Add locations for Y, without any spacing.
- Finally, add locations for Z within 200m of each other as well X and Y.
The distance diagram between those locations end up as:
- From->To.
- X->X: 400m
- Y->X, Y->Y: unspecified.
- Z->X, Z->Y, Z->Z: 200m.
point_type: i32
Specifies whether the minimum spacing constraint applies to the
center-point or to the snapped point of playable locations. The default
value is CENTER_POINT
.
If a snapped point is not available for a playable location, its center-point is used instead.
Set this to the point type used in your game.
Implementations§
source§impl SpacingOptions
impl SpacingOptions
sourcepub fn point_type(&self) -> PointType
pub fn point_type(&self) -> PointType
Returns the enum value of point_type
, or the default if the field is set to an invalid enum value.
sourcepub fn set_point_type(&mut self, value: PointType)
pub fn set_point_type(&mut self, value: PointType)
Sets point_type
to the provided enum value.
Trait Implementations§
source§impl Clone for SpacingOptions
impl Clone for SpacingOptions
source§fn clone(&self) -> SpacingOptions
fn clone(&self) -> SpacingOptions
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for SpacingOptions
impl Debug for SpacingOptions
source§impl Default for SpacingOptions
impl Default for SpacingOptions
source§impl Message for SpacingOptions
impl Message for SpacingOptions
source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
source§fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
source§fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
. Read moresource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
.source§impl PartialEq for SpacingOptions
impl PartialEq for SpacingOptions
source§fn eq(&self, other: &SpacingOptions) -> bool
fn eq(&self, other: &SpacingOptions) -> bool
self
and other
values to be equal, and is used
by ==
.impl Copy for SpacingOptions
impl StructuralPartialEq for SpacingOptions
Auto Trait Implementations§
impl Freeze for SpacingOptions
impl RefUnwindSafe for SpacingOptions
impl Send for SpacingOptions
impl Sync for SpacingOptions
impl Unpin for SpacingOptions
impl UnwindSafe for SpacingOptions
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request