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 ParserState
impl ParserState
pub fn new( protocol_version: u32, analyser_handles: fn(message_type: MessageType) -> bool, parse_all: bool, ) -> Self
pub fn get_static_baseline( &self, class_id: ClassId, send_table: &SendTable, ) -> Result<Vec<SendProp>>
pub fn get_baseline( &self, baseline_index: BaselineIndex, entity_index: EntityId, class_id: ClassId, send_table: &SendTable, is_delta: bool, ) -> Result<Cow<'_, [SendProp]>>
pub fn handle_data_table( &mut self, parse_tables: &[ParseSendTable], server_classes: Vec<ServerClass>, ) -> Result<()>
pub fn handle_string_table_meta(&mut self, table: StringTableMeta)
pub fn should_parse_message(&self, message_type: MessageType) -> bool
pub fn does_handle(message_type: MessageType) -> bool
pub fn handle_message(&mut self, message: Message<'_>, _tick: DemoTick)
pub fn handle_string_entry( &mut self, table: &str, _index: usize, entry: &StringTableEntry<'_>, )
pub fn index_for_prop( &self, class: ClassId, prop: SendPropIdentifier, ) -> Option<u32>
Trait Implementations§
Source§impl Clone for ParserState
impl Clone for ParserState
Source§fn clone(&self) -> ParserState
fn clone(&self) -> ParserState
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl !Freeze for ParserState
impl !RefUnwindSafe for ParserState
impl !Send for ParserState
impl !Sync for ParserState
impl Unpin for ParserState
impl UnwindSafe for ParserState
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more