Return MergedList<T> from list_all_* and drop the _with_cache_hint variants

Offen
#1,430 0 Kommentare 0 Reaktionen 1 zugewiesene Person Auf GitHub ansehen

Maintainer antworten meist innerhalb von 3 Tagen

@DaleSeo arbeitet bereits daran.

Seit 03.11.2026.

Bewertung

Dieses Issue wurde noch nicht bewertet.

Beschreibung

enhancement P3 ready for work T-service v4

#1429 (for #1411) adds Peer::list_all_*_with_cache_hint() methods next to the existing list_all_* methods. They return a MergedList<T> { items, ttl_ms, cache_scope } so callers can cache a merged list. The new methods sit beside the old ones only because changing the return type of list_all_* is a breaking change.

In the next major release, list_all_* could return MergedList<T> directly, and the five _with_cache_hint methods would be removed. That leaves one method per list kind instead of two. Callers that only need the items would write .items.

This is a breaking change, so it should ship with the other changes in the next major release rather than in a major release of its own.

Vorherrschende Sprache
Rust
Sterne
4.1k
Forks
694
Ø Merge
4 T. 16 Std.
Gemergte PRs (30 T.)
43

Entwicklungsumgebung

In Codespaces öffnen

Startet den Dev-Container des Projekts im Browser, mit Ihrem eigenen GitHub-Konto.

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus modelcontextprotocol/rust-sdk

Alle Issues in modelcontextprotocol/rust-sdk

Ähnliche Issues

Weitere Issues zu Rust

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.