pub struct WorkerSummary {
pub id: WorkerId,
pub consecutive_failures: u32,
pub last_action: Option<String>,
pub last_success: Option<bool>,
pub last_output: Option<String>,
pub history_len: usize,
pub has_escalation: bool,
}Expand description
Worker 状態の要約
Fields§
§id: WorkerIdWorker ID
consecutive_failures: u32連続失敗数
last_action: Option<String>最新アクション名
last_success: Option<bool>最新アクションの成功/失敗
last_output: Option<String>最新アクションの出力(Environment からの結果)
history_len: usize履歴の長さ
has_escalation: boolEscalation 中かどうか
Implementations§
Source§impl WorkerSummary
impl WorkerSummary
pub fn new(id: WorkerId) -> Self
Sourcepub fn with_failures(self, count: u32) -> Self
pub fn with_failures(self, count: u32) -> Self
連続失敗数を設定
Sourcepub fn with_last_action(self, action: impl Into<String>, success: bool) -> Self
pub fn with_last_action(self, action: impl Into<String>, success: bool) -> Self
最新アクションを設定
Sourcepub fn with_history_len(self, len: usize) -> Self
pub fn with_history_len(self, len: usize) -> Self
履歴の長さを設定
Sourcepub fn with_escalation(self, has_escalation: bool) -> Self
pub fn with_escalation(self, has_escalation: bool) -> Self
Escalation を設定
Trait Implementations§
Source§impl Clone for WorkerSummary
impl Clone for WorkerSummary
Source§fn clone(&self) -> WorkerSummary
fn clone(&self) -> WorkerSummary
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 moreAuto Trait Implementations§
impl Freeze for WorkerSummary
impl RefUnwindSafe for WorkerSummary
impl Send for WorkerSummary
impl Sync for WorkerSummary
impl Unpin for WorkerSummary
impl UnwindSafe for WorkerSummary
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