Skip to content

[policy] Validate BackoffPolicy invariants#103

Merged
mr-chelyshkin merged 1 commit into
mainfrom
low-fix-2
Jun 27, 2026
Merged

[policy] Validate BackoffPolicy invariants#103
mr-chelyshkin merged 1 commit into
mainfrom
low-fix-2

Conversation

@mr-chelyshkin

Copy link
Copy Markdown
Contributor

📝 Description

Adds a checked BackoffPolicy::new constructor, exposes BackoffError, and makes backoff fields private behind accessors.

✅ Checklist

  • Documentation updated (README, rustdoc, examples)
  • Tests added/updated (if relevant)
  • CI passes locally

Breaking

BackoffPolicy fields are now private, struct literals like

BackoffPolicy { first, max, factor, jitter }

no longer compile.

Use

BackoffPolicy::new(first, max, factor, jitter)?
BackoffPolicy::default()

@mr-chelyshkin mr-chelyshkin self-assigned this Jun 27, 2026
@mr-chelyshkin mr-chelyshkin added the other Other label Jun 27, 2026
@mr-chelyshkin mr-chelyshkin merged commit 2c2b7f0 into main Jun 27, 2026
21 checks passed
@mr-chelyshkin mr-chelyshkin deleted the low-fix-2 branch June 27, 2026 11:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

other Other

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant