[][src]Struct evtclib::Log

pub struct Log { /* fields omitted */ }

A fully processed log file.

Implementations

impl Log[src]

pub fn agents(&self) -> &[Agent][src]

Return all agents present in this log.

pub fn agent_by_addr(&self, addr: u64) -> Option<&Agent>[src]

Return an agent based on its address.

pub fn agent_by_instance_id(&self, instance_id: u16) -> Option<&Agent>[src]

Return an agent based on the instance ID.

pub fn master_agent(&self, addr: u64) -> Option<&Agent>[src]

Return the master agent of the given agent.

  • addr - The address of the agent which to get the master for.

pub fn players(&self) -> impl Iterator<Item = &Agent<Player>>[src]

Return an iterator over all agents that represent player characters.

pub fn npcs(&self) -> impl Iterator<Item = &Agent<Character>>[src]

Return an iterator over all agents that are NPCs.

pub fn boss(&self) -> &Agent[src]

Return the boss agent.

Be careful with encounters that have multiple boss agents, such as Trio and Xera.

pub fn boss_agents(&self) -> Vec<&Agent>[src]

Return all boss agents.

This correctly returns multiple agents on encounters where multiple agents are needed.

pub fn is_boss(&self, addr: u64) -> bool[src]

Check whether the given address is a boss agent.

pub fn encounter_id(&self) -> u16[src]

Returns the encounter id.

pub fn encounter(&self) -> Option<Boss>[src]

Returns the encounter, if present.

Some logs don't have an encounter set or have an ID that is unknown to us (for example, if people set up arcdps with custom IDs). Therefore, this method can only return the encounter if we know about it in Boss.

pub fn events(&self) -> &[Event][src]

Return all events present in this log.

impl Log[src]

Convenience data accessing funtions for Logs.

The information that is gathered by those functions is "expensive" to compute, as we have to loop through every event. They are not saved in the header, and instead are implemented using special EventKinds. This is not a limitation of evtclib, but rather a result of how arcdps stores the data.

This also means that those functions are fallible because we cannot guarantee that the special events that we're looking for is actually present in every log file.

Use those functions only if necessary, and prefer to cache the result if it will be reused!

pub fn is_cm(&self) -> bool[src]

Check whether the fight was done with challenge mote activated.

This function always returns false if

  • The fight was done without CM
  • The fight does not have a CM
  • We cannot determine whether the CM was active
  • The boss is not known

pub fn local_start_timestamp(&self) -> Option<u32>[src]

Get the timestamp of when the log was started.

The returned value is a unix timestamp in the local time zone.

If the LogStart event cannot be found, this function returns None.

pub fn local_end_timestamp(&self) -> Option<u32>[src]

Get the timestamp of when the log was ended.

The returned value is a unix timestamp in the local time zone.

If the LogEnd event cannot be found, this function returns None.

pub fn was_rewarded(&self) -> bool[src]

Check if rewards for this fight have been given out.

This can be used as an indication whether the fight was successful (true) or not (false).

Trait Implementations

impl Clone for Log[src]

impl Debug for Log[src]

Auto Trait Implementations

impl RefUnwindSafe for Log

impl Send for Log

impl Sync for Log

impl Unpin for Log

impl UnwindSafe for Log

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.