pub struct Agent {
pub id: usize,
pub prof: u32,
pub elite: u32,
pub is_self: u32,
pub team: u16,
/* private fields */
}
Expand description
Represents an agent in a realtime combat event.
Names are available for the duration of the fight.
Due to this, this struct is not usable for longer than the function call.
If you need it for longer than its lifetime, consider converting it to AgentOwned
.
let owned = agent.to_owned();
let owned: AgentOwned = agent.into();
Fields§
§id: usize
Unique id.
prof: u32
Profession of the agent.
elite: u32
Elite (specialization) of the agent.
is_self: u32
Whether the agent is self (the local player).
team: u16
Team the agent is in.
Implementations§
Source§impl Agent
impl Agent
Sourcepub fn to_owned(&self) -> AgentOwned
pub fn to_owned(&self) -> AgentOwned
Converts the Agent
to the owned version AgentOwned
.
Trait Implementations§
Source§impl From<&Agent> for AgentOwned
impl From<&Agent> for AgentOwned
Source§fn from(agent: &Agent) -> AgentOwned
fn from(agent: &Agent) -> AgentOwned
Converts to this type from the input type.
Source§impl From<Agent> for AgentOwned
impl From<Agent> for AgentOwned
Source§fn from(agent: Agent) -> AgentOwned
fn from(agent: Agent) -> AgentOwned
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for Agent
impl RefUnwindSafe for Agent
impl !Send for Agent
impl !Sync for Agent
impl Unpin for Agent
impl UnwindSafe for Agent
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