Struct flattiverse_connector::Player
source · pub struct Player { /* private fields */ }
Implementations
sourceimpl Player
impl Player
pub fn from_reader(
connector: &Arc<Connector>,
packet: &Packet,
reader: &mut dyn BinaryReader
) -> Result<Player, Error>
pub fn big_avatar_raw(&self) -> Result<Vec<u8>, Error>
pub fn small_avatar_raw(&self) -> Result<Vec<u8>, Error>
pub fn avatar_raw(&self, small: bool) -> Result<Vec<u8>, Error>
pub fn clear_assignment(&self)
sourcepub fn chat(&self, message: &str) -> Result<(), Error>
pub fn chat(&self, message: &str) -> Result<(), Error>
Sens a chat message to this Player. The message needs to be none empty and not longer than 140 characters.
pub fn chat_binary(&self, data: &[u8]) -> Result<(), Error>
sourcepub fn chat_binaries(&self, data: &[&[u8]]) -> Result<(), Error>
pub fn chat_binaries(&self, data: &[&[u8]]) -> Result<(), Error>
Sends up to 32 binary chat messages to this Player. This method guarantees to keep the order of the messages and sends them parallel without opening additional threads. This method opens as many parallel requests as given messages to send. The flattiverse-protocol limits parallel requests (currently at 255). Trying to use more requests will result in an Error
pub fn platform(&self) -> PlatformKind
pub fn version(&self) -> &Version
pub fn performance(&self) -> &Option<PerformanceMark>
pub fn rank(&self) -> u32
pub fn level(&self) -> u8
pub fn elo(&self) -> i32
pub fn ping(&self) -> &TimeSpan
pub fn game_scores(&self) -> &Scores
pub fn player_scores(&self) -> &Scores
pub fn clan(&self) -> Option<String>
pub fn average_commit_time(&self) -> &TimeSpan
pub fn last_commit_time(&self) -> &TimeSpan
pub fn id(&self) -> u16
pub fn connector(&self) -> &Weak<Connector>
pub fn team(&self) -> Weak<Team>
pub fn active(&self) -> bool
pub fn online(&self) -> bool
pub fn controllable_info_list(
&self
) -> &RwLock<UniversalHolder<ControllableInfo>>
pub fn controllable_info(&self, index: u8) -> Option<Arc<ControllableInfo>>
pub fn name(&self) -> &str
pub fn universe_group(&self) -> Weak<UniverseGroup>
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for Player
impl Send for Player
impl Sync for Player
impl Unpin for Player
impl !UnwindSafe for Player
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more