pub struct ParserState {
    pub static_baselines: HashMap<ClassId, StaticBaseline, NullHasherBuilder>,
    pub parsed_static_baselines: RefCell<HashMap<ClassId, Vec<SendProp>, NullHasherBuilder>>,
    pub event_definitions: Vec<GameEventDefinition>,
    pub string_tables: Vec<StringTableMeta>,
    pub entity_classes: HashMap<EntityId, ClassId, NullHasherBuilder>,
    pub send_tables: Vec<SendTable>,
    pub server_classes: Vec<ServerClass>,
    pub instance_baselines: [Baseline; 2],
    pub demo_meta: DemoMeta,
    pub protocol_version: u32,
    /* private fields */
}

Fields§

§static_baselines: HashMap<ClassId, StaticBaseline, NullHasherBuilder>§parsed_static_baselines: RefCell<HashMap<ClassId, Vec<SendProp>, NullHasherBuilder>>§event_definitions: Vec<GameEventDefinition>§string_tables: Vec<StringTableMeta>§entity_classes: HashMap<EntityId, ClassId, NullHasherBuilder>§send_tables: Vec<SendTable>§server_classes: Vec<ServerClass>§instance_baselines: [Baseline; 2]§demo_meta: DemoMeta§protocol_version: u32

Implementations§

source§

impl<'a> ParserState

source

pub fn new( protocol_version: u32, analyser_handles: fn(message_type: MessageType) -> bool, parse_all: bool ) -> Self

source

pub fn get_static_baseline( &self, class_id: ClassId, send_table: &SendTable ) -> Result<Vec<SendProp>>

source

pub fn get_baseline( &self, baseline_index: usize, entity_index: EntityId, class_id: ClassId, send_table: &SendTable, is_delta: bool ) -> Result<Cow<'_, [SendProp]>>

source

pub fn handle_data_table( &mut self, parse_tables: &[ParseSendTable], server_classes: Vec<ServerClass> ) -> Result<()>

source

pub fn handle_string_table_meta(&mut self, table: StringTableMeta)

source

pub fn should_parse_message(&self, message_type: MessageType) -> bool

source

pub fn does_handle(message_type: MessageType) -> bool

source

pub fn handle_message(&mut self, message: Message<'_>, _tick: DemoTick)

source

pub fn handle_string_entry( &mut self, table: &str, _index: usize, entry: &StringTableEntry<'a> )

source

pub fn index_for_prop( &self, class: ClassId, prop: SendPropIdentifier ) -> Option<u32>

Trait Implementations§

source§

impl Clone for ParserState

source§

fn clone(&self) -> ParserState

Returns a copy of the value. Read more
1.0.0 · source§

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

Performs copy-assignment from source. 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> 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> IntoResult<T> for T

§

type Err = Infallible

source§

fn into_result(self) -> Result<T, <T as IntoResult<T>>::Err>

source§

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

§

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

§

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.