Enum teehistorian::chunks::Chunk

source ·
pub enum Chunk<'a> {
Show 33 variants PlayerDiff(PlayerDiff), Eos, TickSkip(TickSkip), PlayerNew(PlayerNew), PlayerOld(PlayerOld), InputDiff(InputDiff), InputNew(InputNew), NetMessage(NetMessage<'a>), Join(Join), Drop(Drop<'a>), ConsoleCommand(ConsoleCommand<'a>), UnknownEx(UnknownEx<'a>), Test, DdnetVersionOld(DdnetVersionOld), DdnetVersion(DdnetVersion<'a>), AuthInit(Auth<'a>), AuthLogin(Auth<'a>), AuthLogout(AuthLogout), JoinVer6(PlayerId), JoinVer7(PlayerId), RejoinVer6(PlayerId), TeamSaveSuccess(TeamSave<'a>), TeamSaveFailure(Team), TeamLoadSuccess(TeamSave<'a>), TeamLoadFailure(Team), PlayerTeam(PlayerTeam), TeamPractice(TeamPractice), PlayerReady(PlayerId), PlayerSwap(PlayerSwap), Antibot(Antibot<'a>), PlayerName(PlayerName<'a>), PlayerFinish(PlayerFinish), TeamFinish(TeamFinish),
}

Variants§

§

PlayerDiff(PlayerDiff)

for file size optimization in the binary representation the tag is left out. Instead, the cid is tag (0-63). In the Teeworlds variable-width integer all these numbers have a width of one byte

§

Eos

End of teehistorian chunk stream (tag -1)

§

TickSkip(TickSkip)

tag: -2

§

PlayerNew(PlayerNew)

tag: -3

§

PlayerOld(PlayerOld)

tag: -4

§

InputDiff(InputDiff)

tag -5

§

InputNew(InputNew)

tag: -6

§

NetMessage(NetMessage<'a>)

tag: -7

§

Join(Join)

tag: -8

§

Drop(Drop<'a>)

tag: -9

§

ConsoleCommand(ConsoleCommand<'a>)

tag: -10

§

UnknownEx(UnknownEx<'a>)

tag: -11

§

Test

teehistorian-test@ddnet.tw test extension used in debug mode

§

DdnetVersionOld(DdnetVersionOld)

teehistorian-ddnetver-old@ddnet.tw

§

DdnetVersion(DdnetVersion<'a>)

teehistorian-ddnetver@ddnet.tw

§

AuthInit(Auth<'a>)

teehistorian-auth-init@ddnet.tw

§

AuthLogin(Auth<'a>)

teehistorian-auth-login@ddnet.tw

§

AuthLogout(AuthLogout)

teehistorian-auth-logout@ddnet.tw

§

JoinVer6(PlayerId)

teehistorian-joinver6@ddnet.tw

§

JoinVer7(PlayerId)

teehistorian-joinver7@ddnet.tw

§

RejoinVer6(PlayerId)

teehistorian-rejoinver6@ddnet.org

§

TeamSaveSuccess(TeamSave<'a>)

teehistorian-save-success@ddnet.tw

§

TeamSaveFailure(Team)

§

TeamLoadSuccess(TeamSave<'a>)

§

TeamLoadFailure(Team)

§

PlayerTeam(PlayerTeam)

teehistorian-player-team@ddnet.tw

§

TeamPractice(TeamPractice)

teehistorian-team-practice@ddnet.tw

§

PlayerReady(PlayerId)

teehistorian-player-ready@ddnet.tw

§

PlayerSwap(PlayerSwap)

teehistorian-player-swap@ddnet.tw

§

Antibot(Antibot<'a>)

teehistorian-antibot@ddnet.org

§

PlayerName(PlayerName<'a>)

teehistorian-player-name@ddnet.org

§

PlayerFinish(PlayerFinish)

teehistorian-player-finish@ddnet.org

§

TeamFinish(TeamFinish)

teehistorian-team-finish@ddnet.org

Implementations§

source§

impl<'a> Chunk<'a>

source

pub fn cid(&self) -> Option<i32>

Returns the player_id associated to the chunk. None, if Chunk isn’t by a player (e.g. Eos). PlayerSwap is dependent on two tees and currently returns None.

Trait Implementations§

source§

impl<'a> Debug for Chunk<'a>

source§

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

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

impl<'a> PartialEq for Chunk<'a>

source§

fn eq(&self, other: &Chunk<'a>) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<'a> Serialize for Chunk<'a>

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
source§

impl<'a> StructuralPartialEq for Chunk<'a>

Auto Trait Implementations§

§

impl<'a> Freeze for Chunk<'a>

§

impl<'a> RefUnwindSafe for Chunk<'a>

§

impl<'a> Send for Chunk<'a>

§

impl<'a> Sync for Chunk<'a>

§

impl<'a> Unpin for Chunk<'a>

§

impl<'a> UnwindSafe for Chunk<'a>

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> 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, U> TryFrom<U> for T
where U: Into<T>,

§

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>,

§

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.