Struct rust_sc2::PlayerSettings[][src]

pub struct PlayerSettings<'a> {
    pub race: Race,
    pub name: Option<&'a str>,
    pub raw_affects_selection: bool,
    pub raw_crop_to_playable_area: bool,
}

Settings that must be provided by a player when joining a game.

if name is None, it’ll be shown as “foo(whatever)” in game.

if raw_affects_selection is true, bot will select units to which it gives orders.

if raw_crop_to_playable_area is true, maps will be crooped to the size of self.game_info.playable_area.

Defaults: name: None raw_affects_selection: false raw_crop_to_playable_area: false

Fields

race: Racename: Option<&'a str>raw_affects_selection: boolraw_crop_to_playable_area: bool

Implementations

impl<'a> PlayerSettings<'a>[src]

pub fn new(race: Race) -> Self[src]

Constructs new settings with given Race.

pub fn with_name(self, name: &'a str) -> Self[src]

Sets name of the player.

pub fn raw_affects_selection(self, val: bool) -> Self[src]

Sets raw_affects_selection to a given value.

pub fn raw_crop_to_playable_area(self, val: bool) -> Self[src]

Sets raw_crop_to_playable_area to a given value.

Trait Implementations

impl Default for PlayerSettings<'_>[src]

Auto Trait Implementations

impl<'a> RefUnwindSafe for PlayerSettings<'a>

impl<'a> Send for PlayerSettings<'a>

impl<'a> Sync for PlayerSettings<'a>

impl<'a> Unpin for PlayerSettings<'a>

impl<'a> UnwindSafe for PlayerSettings<'a>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,