pub struct Client {
pub key: String,
pub host: String,
pub team: Team,
pub destinations: Arc<Mutex<Destinations>>,
/* private fields */
}
Fields§
§key: String
§host: String
§team: Team
§destinations: Arc<Mutex<Destinations>>
Implementations§
Source§impl Client
impl Client
pub fn new(key: String, host: String, team: Team) -> RskResult<Client>
pub async fn send_command( &self, team: Team, number: RobotNumber, command: Command, ) -> RskResult<()>
pub fn req_process( key: &str, host: &str, rx: &Receiver<(Team, RobotNumber, Command)>, ) -> RskResult<()>
pub fn sub_process( host: &str, game_data: Arc<Mutex<Option<GameData>>>, ) -> RskResult<()>
pub async fn goto_process( client: Client, team: Team, number: RobotNumber, ) -> RskResult<()>
pub async fn get_destinations(&self) -> RskResult<Destinations>
pub fn get_game_data(&self) -> RskResult<GameData>
pub fn get_robot(&self, team: Team, number: RobotNumber) -> RskResult<Robot<'_>>
pub async fn is_arrived( &self, team: Team, number: RobotNumber, ) -> RskResult<bool>
pub async fn get_destination( &self, team: Team, number: RobotNumber, ) -> RskResult<Option<Destination>>
pub async fn set_destination( &self, team: Team, number: RobotNumber, destination: Option<Destination>, ) -> RskResult<()>
pub async fn goto( &self, team: Team, number: RobotNumber, destination: Destination, ) -> RskResult<()>
pub async fn stop(&self, team: Team, number: RobotNumber) -> RskResult<()>
pub async fn goto_blocking( &self, team: Team, number: RobotNumber, destination: Destination, ) -> RskResult<()>
pub fn get_ball(&self) -> RskResult<Position>
pub async fn get_allies(&self) -> RskResult<(Robot<'_>, Robot<'_>)>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Client
impl !RefUnwindSafe for Client
impl Send for Client
impl Sync for Client
impl Unpin for Client
impl !UnwindSafe for Client
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
Mutably borrows from an owned value. Read more