pub struct TerminationStats {
pub total_ticks: u64,
pub total_actions: u64,
pub successful_actions: u64,
pub failed_actions: u64,
pub scenario: Option<String>,
pub group_id: Option<String>,
}Expand description
終了時の統計情報(シリアライズ可能)
Fields§
§total_ticks: u64総 Tick 数
total_actions: u64総アクション数
successful_actions: u64成功アクション数
failed_actions: u64失敗アクション数
scenario: Option<String>シナリオ名(あれば)
group_id: Option<String>GroupId(あれば)
Implementations§
Source§impl TerminationStats
impl TerminationStats
Sourcepub fn from_state(state: &SwarmState) -> Self
pub fn from_state(state: &SwarmState) -> Self
SwarmState から統計を抽出
Sourcepub fn with_scenario(self, scenario: impl Into<String>) -> Self
pub fn with_scenario(self, scenario: impl Into<String>) -> Self
シナリオ名を設定
Sourcepub fn with_group_id(self, group_id: impl Into<String>) -> Self
pub fn with_group_id(self, group_id: impl Into<String>) -> Self
GroupId を設定
Trait Implementations§
Source§impl Clone for TerminationStats
impl Clone for TerminationStats
Source§fn clone(&self) -> TerminationStats
fn clone(&self) -> TerminationStats
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TerminationStats
impl Debug for TerminationStats
Source§impl Default for TerminationStats
impl Default for TerminationStats
Source§fn default() -> TerminationStats
fn default() -> TerminationStats
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for TerminationStats
impl RefUnwindSafe for TerminationStats
impl Send for TerminationStats
impl Sync for TerminationStats
impl Unpin for TerminationStats
impl UnwindSafe for TerminationStats
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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