MatchData

Struct MatchData 

Source
pub struct MatchData {
Show 19 fields pub match_id: i32, pub in_progress: bool, pub match_type: i8, pub play_mods: u32, pub match_name: String, pub password: Option<String>, pub beatmap_name: String, pub beatmap_id: i32, pub beatmap_md5: String, pub slot_status: Vec<u8>, pub slot_teams: Vec<u8>, pub slot_players: Vec<i32>, pub host_player_id: i32, pub match_game_mode: u8, pub win_condition: u8, pub team_type: u8, pub freemods: bool, pub player_mods: Vec<i32>, pub match_seed: i32,
}
Expand description

MatchData is the data of bancho client multiplayer game room.

Fields§

§match_id: i32§in_progress: bool§match_type: i8§play_mods: u32§match_name: String§password: Option<String>§beatmap_name: String§beatmap_id: i32§beatmap_md5: String§slot_status: Vec<u8>§slot_teams: Vec<u8>§slot_players: Vec<i32>§host_player_id: i32§match_game_mode: u8§win_condition: u8§team_type: u8§freemods: bool§player_mods: Vec<i32>§match_seed: i32

Trait Implementations§

Source§

impl BanchoPacketLength for MatchData

Source§

fn packet_len(&self) -> usize

Calculate the byte length of self after being converted into a bancho packet, which is used to allocate Vec space in advance to improve performance. Read more
Source§

impl BanchoPacketWrite for MatchData

Source§

fn write_into_buf(self, buf: &mut Vec<u8>)

Convert self into a bancho packet and write it into buf Vec<u8>.
Source§

fn into_packet(self) -> Vec<u8>
where Self: Sized,

Convert self into a bancho packet Vec<u8>.
Source§

impl Clone for MatchData

Source§

fn clone(&self) -> MatchData

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for MatchData

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for MatchData

Source§

fn default() -> MatchData

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for MatchData

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for MatchData

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,