pub struct DebugBot {
id: usize,
status: LifeStatus,
role: Identity,
username: String,
}
Fields§
§id: usize
§status: LifeStatus
§role: Identity
§username: String
Implementations§
Trait Implementations§
source§impl Responder for DebugBot
impl Responder for DebugBot
source§fn send_number(&mut self, _x: usize)
fn send_number(&mut self, _x: usize)
默认实现发送数字,开头以
n
标记。source§fn rec_number(&mut self) -> usize
fn rec_number(&mut self) -> usize
接收一个数字。
source§fn send_begin(&mut self)
fn send_begin(&mut self)
表示和一个应答者通话的开始。
source§fn vote(&mut self, _msg: &str, list: Vec<(usize, String)>) -> (String, usize)
fn vote(&mut self, _msg: &str, list: Vec<(usize, String)>) -> (String, usize)
投票。返回 (详情字符串, 选票指向的 id)。
注意投票需要开始信号,因为平票多次投票中,玩家只多次响应单次投票,而把详细信息当作普通信息显示。
注意投票需要开始信号,因为平票多次投票中,玩家只多次响应单次投票,而把详细信息当作普通信息显示。
fn role(&self) -> Identity
fn set_role(&mut self, r: Identity)
fn status(&self) -> LifeStatus
fn set_status(&mut self, s: LifeStatus)
fn set_name(&mut self)
fn name(&self) -> String
fn set_id(&mut self, id: usize)
fn get_id(&self) -> usize
source§fn coutinue_game(&mut self)
fn coutinue_game(&mut self)
在玩家端游戏结束判定时发送继续游戏。其实只是发送一个结束信号。
fn cost(&self) -> (u64, u64)
Auto Trait Implementations§
impl Freeze for DebugBot
impl RefUnwindSafe for DebugBot
impl Send for DebugBot
impl Sync for DebugBot
impl Unpin for DebugBot
impl UnwindSafe for DebugBot
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