Skip to content

Cosmos: Expand impl Into<PartitionKey> Examples and Doc Comments #3570

@analogrelay

Description

@analogrelay

This issue tracks adding more concrete usage examples and additional tests to help users understand all the ways to specify partition keys with the impl Into<PartitionKey> API pattern.

  • Add new tests to partition_key.rs demonstrating how to specify partition keys using various types (e.g., &str, String, () for empty, Vec types, etc) and validate these code paths work as intended.
  • Update relevant doc comments in both the SDK API surface and models to include these usage patterns for developers as reference.
  • Ensure documentation links to or references the new exhaustive tests so users can find working code examples easily.

Goal: Bring confidence that users can specify partition keys in all supported ways and improve discoverability with robust examples and test coverage.

Metadata

Metadata

Assignees

No one assigned

    Labels

    CosmosThe azure_cosmos crate

    Type

    Projects

    Status

    In Review

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions