pub struct Log {
pub header: Header,
pub agents: Vec<Agent>,
pub skills: Vec<Skill>,
pub events: Vec<Event>,
}Expand description
An EVTC log.
Fields§
§header: HeaderThe log header with meta information.
agents: Vec<Agent>Agents (entities) present in the log.
skills: Vec<Skill>Information about skills used in the log.
events: Vec<Event>Every Event occurring in the log.
Some events may also hold meta information, for example StateChange::BuffFormula.
Implementations§
Source§impl Log
impl Log
Sourcepub fn parse_file(path: impl AsRef<Path>) -> Result<Log, ParseError>
pub fn parse_file(path: impl AsRef<Path>) -> Result<Log, ParseError>
Sourcepub fn agent_mut(&mut self, id: u64) -> Option<&mut Agent>
pub fn agent_mut(&mut self, id: u64) -> Option<&mut Agent>
Returns a mutable reference to the Agent with the given id.
Sourcepub fn agent_name(&self, id: u64) -> Option<&[String]>
pub fn agent_name(&self, id: u64) -> Option<&[String]>
Returns the name(s) of the Agent with the given id.
Sourcepub fn skill_mut(&mut self, id: u32) -> Option<&mut Skill>
pub fn skill_mut(&mut self, id: u32) -> Option<&mut Skill>
Returns a mutable reference to the Skill with the given id.
Sourcepub fn skill_name(&self, id: u32) -> Option<&str>
pub fn skill_name(&self, id: u32) -> Option<&str>
Returns the name of the Skill with the given id.
Sourcepub fn into_transformed(self) -> LogTransformed
pub fn into_transformed(self) -> LogTransformed
Converts the log into its LogTransformed equivalent.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Log
impl<'de> Deserialize<'de> for Log
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<Log> for LogTransformed
impl From<Log> for LogTransformed
Source§impl Parse for Log
impl Parse for Log
Source§type Error = ParseError
type Error = ParseError
Associated error which can happen during parsing.
Source§fn parse(input: &mut impl Read) -> Result<Self, Self::Error>
fn parse(input: &mut impl Read) -> Result<Self, Self::Error>
Parses a value of this type from the input.
Source§fn parse_multi<T>(input: &mut impl Read, count: usize) -> Result<T, Self::Error>where
T: FromIterator<Self>,
fn parse_multi<T>(input: &mut impl Read, count: usize) -> Result<T, Self::Error>where
T: FromIterator<Self>,
Parses multiple values of this type from the input into a
Vec.Auto Trait Implementations§
impl Freeze for Log
impl RefUnwindSafe for Log
impl Send for Log
impl Sync for Log
impl Unpin for Log
impl UnwindSafe for Log
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