Struct tf_demo_parser::demo::parser::state::ParserState
source · [−]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: [HashMap<EntityId, Vec<SendProp>, NullHasherBuilder>; 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: [HashMap<EntityId, Vec<SendProp>, NullHasherBuilder>; 2]
demo_meta: DemoMeta
protocol_version: u32
Implementations
sourceimpl<'a> ParserState
impl<'a> 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: usize,
entity_index: EntityId,
class_id: ClassId,
send_table: &SendTable
) -> Result<Vec<SendProp>>
pub fn handle_data_table(
&mut self,
parse_tables: Vec<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: u32)
pub fn handle_string_entry(
&mut self,
table: &str,
_index: usize,
entry: &StringTableEntry<'a>
)
Trait Implementations
sourceimpl Clone for ParserState
impl Clone for ParserState
sourcefn clone(&self) -> ParserState
fn clone(&self) -> ParserState
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
Auto Trait Implementations
impl !RefUnwindSafe for ParserState
impl !Send for ParserState
impl !Sync for ParserState
impl Unpin for ParserState
impl UnwindSafe for ParserState
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> IntoResult<T> for T
impl<T> IntoResult<T> for T
type Err = Infallible
pub fn into_result(self) -> Result<T, <T as IntoResult<T>>::Err>
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more