MCPcopy Create free account
hub / github.com/ChrisFeldmeier/OpenCodeRust / new

Method new

crates/opencode-session/src/retry.rs:132–138  ·  view source on GitHub ↗
(max_attempts: u32)

Source from the content-addressed store, hash-verified

130
131impl RetryState {
132 pub fn new(max_attempts: u32) -> Self {
133 Self {
134 attempt: 0,
135 max_attempts,
136 last_error: None,
137 }
138 }
139
140 pub fn should_retry(&self) -> bool {
141 self.attempt < self.max_attempts

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected