Struct rust_sc2::client::RunnerSingle [−][src]
pub struct RunnerSingle<'a, B> where
B: Player + DerefMut<Target = Bot> + Deref<Target = Bot>, { pub computer: Computer, pub realtime: bool, pub save_replay_as: Option<&'a str>, // some fields omitted }
Runner for games vs built-in AI.
Fields
computer: Computer
Computer opponent configuration.
realtime: bool
Play games in real time mode or not.
save_replay_as: Option<&'a str>
Save replay after the game in given path.
Implementations
impl<'a, B> RunnerSingle<'a, B> where
B: Player + DerefMut<Target = Bot> + Deref<Target = Bot>,
[src]
B: Player + DerefMut<Target = Bot> + Deref<Target = Bot>,
pub fn new(
bot: &'a mut B,
computer: Computer,
map: &str,
sc2_version: Option<&'a str>
) -> Self
[src]
bot: &'a mut B,
computer: Computer,
map: &str,
sc2_version: Option<&'a str>
) -> Self
Constructs new single player runner.
pub fn launch(&mut self) -> SC2Result<()>
[src]
Launches SC2 client and connects bot to the API.
pub fn run_game(&mut self) -> SC2Result<()>
[src]
Runs requested game.
pub fn set_map(&mut self, map: &str)
[src]
pub fn close(&mut self)
[src]
Manually closes SC2 client.
Auto Trait Implementations
impl<'a, B> RefUnwindSafe for RunnerSingle<'a, B> where
B: RefUnwindSafe,
B: RefUnwindSafe,
impl<'a, B> Send for RunnerSingle<'a, B> where
B: Send,
B: Send,
impl<'a, B> Sync for RunnerSingle<'a, B> where
B: Sync,
B: Sync,
impl<'a, B> Unpin for RunnerSingle<'a, B>
impl<'a, B> !UnwindSafe for RunnerSingle<'a, B>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
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]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,