pub struct DemoHandler<'a, T: MessageHandler> {
pub server_tick: ServerTick,
pub demo_tick: DemoTick,
pub string_table_names: Vec<Cow<'a, str>>,
pub state_handler: ParserState,
/* private fields */
}
Fields§
§server_tick: ServerTick
§demo_tick: DemoTick
§string_table_names: Vec<Cow<'a, str>>
§state_handler: ParserState
Implementations§
Source§impl DemoHandler<'_, NullHandler>
impl DemoHandler<'_, NullHandler>
Source§impl<'a, T: MessageHandler> DemoHandler<'a, T>
impl<'a, T: MessageHandler> DemoHandler<'a, T>
pub fn with_analyser(analyser: T) -> Self
pub fn parse_all_with_analyser(analyser: T) -> Self
pub fn handle_header(&mut self, header: &Header)
pub fn handle_packet(&mut self, packet: Packet<'a>) -> Result<()>
pub fn handle_message(&mut self, message: Message<'a>, tick: DemoTick)
pub fn into_output(self) -> T::Output
pub fn get_parser_state(&self) -> &ParserState
Source§impl<T: MessageHandler + BorrowMessageHandler> DemoHandler<'_, T>
impl<T: MessageHandler + BorrowMessageHandler> DemoHandler<'_, T>
pub fn borrow_output(&self) -> &T::Output
Trait Implementations§
Source§impl<'a, T: Clone + MessageHandler> Clone for DemoHandler<'a, T>
impl<'a, T: Clone + MessageHandler> Clone for DemoHandler<'a, T>
Source§fn clone(&self) -> DemoHandler<'a, T>
fn clone(&self) -> DemoHandler<'a, T>
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 moreSource§impl Default for DemoHandler<'_, NullHandler>
impl Default for DemoHandler<'_, NullHandler>
Auto Trait Implementations§
impl<'a, T> !Freeze for DemoHandler<'a, T>
impl<'a, T> !RefUnwindSafe for DemoHandler<'a, T>
impl<'a, T> !Send for DemoHandler<'a, T>
impl<'a, T> !Sync for DemoHandler<'a, T>
impl<'a, T> Unpin for DemoHandler<'a, T>where
T: Unpin,
impl<'a, T> UnwindSafe for DemoHandler<'a, T>where
T: UnwindSafe,
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