[−][src]Trait weasel::character::Character
A trait for objects which possess statistics.
Required methods
fn statistics<'a>(&'a self) -> Box<dyn Iterator<Item = &'a Statistic<R>> + 'a>
Returns an iterator over statistics.
fn statistics_mut<'a>(
&'a mut self
) -> Box<dyn Iterator<Item = &'a mut Statistic<R>> + 'a>
&'a mut self
) -> Box<dyn Iterator<Item = &'a mut Statistic<R>> + 'a>
Returns a mutable iterator over statistics.
fn statistic(&self, id: &StatisticId<R>) -> Option<&Statistic<R>>
Returns the statistic with the given id.
fn statistic_mut(&mut self, id: &StatisticId<R>) -> Option<&mut Statistic<R>>
Returns a mutable reference to the statistic with the given id.
fn add_statistic(&mut self, statistic: Statistic<R>) -> Option<Statistic<R>>
Adds a new statistic. Replaces an existing statistic with the same id. Returns the replaced statistic, if present.
fn remove_statistic(&mut self, id: &StatisticId<R>) -> Option<Statistic<R>>
Removes a statistic. Returns the removed statistic, if present.
fn statuses<'a>(&'a self) -> Box<dyn Iterator<Item = &'a AppliedStatus<R>> + 'a>
Returns an iterator over statuses.
fn statuses_mut<'a>(
&'a mut self
) -> Box<dyn Iterator<Item = &'a mut AppliedStatus<R>> + 'a>
&'a mut self
) -> Box<dyn Iterator<Item = &'a mut AppliedStatus<R>> + 'a>
Returns a mutable iterator over statuses.
fn status(&self, id: &StatusId<R>) -> Option<&AppliedStatus<R>>
Returns the status with the given id.
fn status_mut(&mut self, id: &StatusId<R>) -> Option<&mut AppliedStatus<R>>
Returns a mutable reference to the status with the given id.
fn add_status(&mut self, status: AppliedStatus<R>) -> Option<AppliedStatus<R>>
Adds a new status. Replaces an existing status with the same id. Returns the replaced status, if present.
fn remove_status(&mut self, id: &StatusId<R>) -> Option<AppliedStatus<R>>
Removes a status. Returns the removed status, if present.
Implementors
impl<R: BattleRules> Character<R> for Creature<R>
[src]
fn statistics<'a>(&'a self) -> Box<dyn Iterator<Item = &'a Statistic<R>> + 'a>
[src]
fn statistics_mut<'a>(
&'a mut self
) -> Box<dyn Iterator<Item = &'a mut Statistic<R>> + 'a>
[src]
&'a mut self
) -> Box<dyn Iterator<Item = &'a mut Statistic<R>> + 'a>
fn statistic(&self, id: &StatisticId<R>) -> Option<&Statistic<R>>
[src]
fn statistic_mut(&mut self, id: &StatisticId<R>) -> Option<&mut Statistic<R>>
[src]
fn add_statistic(&mut self, statistic: Statistic<R>) -> Option<Statistic<R>>
[src]
fn remove_statistic(&mut self, id: &StatisticId<R>) -> Option<Statistic<R>>
[src]
fn statuses<'a>(&'a self) -> Box<dyn Iterator<Item = &'a AppliedStatus<R>> + 'a>
[src]
fn statuses_mut<'a>(
&'a mut self
) -> Box<dyn Iterator<Item = &'a mut AppliedStatus<R>> + 'a>
[src]
&'a mut self
) -> Box<dyn Iterator<Item = &'a mut AppliedStatus<R>> + 'a>
fn status(&self, id: &StatusId<R>) -> Option<&AppliedStatus<R>>
[src]
fn status_mut(&mut self, id: &StatusId<R>) -> Option<&mut AppliedStatus<R>>
[src]
fn add_status(&mut self, status: AppliedStatus<R>) -> Option<AppliedStatus<R>>
[src]
fn remove_status(&mut self, id: &StatusId<R>) -> Option<AppliedStatus<R>>
[src]
impl<R: BattleRules> Character<R> for Object<R>
[src]
fn statistics<'a>(&'a self) -> Box<dyn Iterator<Item = &'a Statistic<R>> + 'a>
[src]
fn statistics_mut<'a>(
&'a mut self
) -> Box<dyn Iterator<Item = &'a mut Statistic<R>> + 'a>
[src]
&'a mut self
) -> Box<dyn Iterator<Item = &'a mut Statistic<R>> + 'a>
fn statistic(&self, id: &StatisticId<R>) -> Option<&Statistic<R>>
[src]
fn statistic_mut(&mut self, id: &StatisticId<R>) -> Option<&mut Statistic<R>>
[src]
fn add_statistic(&mut self, statistic: Statistic<R>) -> Option<Statistic<R>>
[src]
fn remove_statistic(&mut self, id: &StatisticId<R>) -> Option<Statistic<R>>
[src]
fn statuses<'a>(&'a self) -> Box<dyn Iterator<Item = &'a AppliedStatus<R>> + 'a>
[src]
fn statuses_mut<'a>(
&'a mut self
) -> Box<dyn Iterator<Item = &'a mut AppliedStatus<R>> + 'a>
[src]
&'a mut self
) -> Box<dyn Iterator<Item = &'a mut AppliedStatus<R>> + 'a>