Skip to content

docs(frame): update frame types docs#80

Merged
0x676e67 merged 1 commit into
masterfrom
docs
Feb 24, 2026
Merged

docs(frame): update frame types docs#80
0x676e67 merged 1 commit into
masterfrom
docs

Conversation

@0x676e67
Copy link
Copy Markdown
Owner

No description provided.

@gemini-code-assist
Copy link
Copy Markdown

Summary of Changes

Hello @0x676e67, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request primarily focuses on enhancing the documentation for HTTP/2 frame types, making it more concise and accurate by simplifying explanations and linking directly to relevant types. It also includes minor code adjustments such as restricting the visibility of a struct field and adding #[inline] attributes to certain methods, which can serve as performance hints to the Rust compiler.

Highlights

  • Documentation Refinement: Updated and simplified doc comments for several structs and methods across headers.rs, priority.rs, and settings.rs to improve clarity and conciseness, particularly for builder patterns and constructor functions.
  • Visibility Adjustment: Modified the order field within the Pseudo struct in headers.rs from public to private, encapsulating its internal management.
  • Performance Hinting: Applied #[inline] attributes to frequently called methods in PseudoOrder and SettingsOrder implementations to suggest inlining by the compiler for potential performance benefits.
Changelog
  • src/frame/headers.rs
    • Changed the order field in the Pseudo struct from public to private.
    • Simplified the doc comment for PseudoOrderBuilder by removing verbose explanations.
    • Added #[inline] attributes to PseudoOrder::builder, PseudoOrder::default, and PseudoOrder::into_iter methods.
  • src/frame/priority.rs
    • Simplified the doc comments for Priority::new and StreamDependency::new methods, replacing detailed parameter lists with direct type references.
  • src/frame/settings.rs
    • Simplified the doc comment for SettingsOrderBuilder by removing verbose explanations.
    • Added #[inline] attributes to SettingsOrder::builder, SettingsOrder::default, and SettingsOrder::into_iter methods.
    • Updated the doc comment for the Setting struct to clarify its nature as a struct rather than an enum.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@0x676e67 0x676e67 merged commit 8b8877b into master Feb 24, 2026
2 of 5 checks passed
@0x676e67 0x676e67 deleted the docs branch February 24, 2026 13:30
Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request aims to update documentation for frame types. It includes some good fixes, such as correcting the documentation for the Setting struct. However, it also removes detailed and useful documentation for several builder structs and new functions, replacing them with very minimal comments. This reduces the clarity and usability of the API. I've left specific comments suggesting to restore the more descriptive documentation. The PR also includes some beneficial code improvements like adding #[inline] attributes and adjusting field visibility, which are good changes but are not reflected in the PR title.

I am having trouble creating individual review comments. Click here to see my feedback.

src/frame/headers.rs (106)

medium

There's a typo here. costructed should be constructed.

/// Typically, a `PseudoOrder` is constructed using the [`PseudoOrderBuilder`] to enforce uniqueness

src/frame/headers.rs (113)

medium

The previous, more detailed documentation for PseudoOrderBuilder was very helpful for understanding its purpose and usage. Removing it reduces the clarity of the public API, especially since the builder's methods are not individually documented. Please consider restoring the more descriptive documentation.

/// A builder for constructing a `PseudoOrder`.
///
/// This builder allows you to incrementally specify the order of pseudo-header fields for an HTTP/2
/// header block. It ensures that each pseudo-header is only included once, and provides methods to
/// push individual pseudo-headers or extend from an iterator. When finished, call `.build()` to
/// obtain a `PseudoOrder` instance.

src/frame/priority.rs (50)

medium

The previous documentation, which included descriptions of parameters and the return value, was more informative for users of this function. Please consider restoring it to improve clarity.

    /// Create a new priority frame.
    ///
    /// # Parameters
    /// - `stream_id`: The ID of the stream. This can be any valid stream ID, including 0.
    /// - `dependency`: The stream dependency information.
    ///
    /// # Returns
    /// A new `Priority` frame.

src/frame/settings.rs (65-69)

medium

This detailed documentation for SettingsOrderBuilder is useful for understanding its purpose. Removing it reduces the clarity of the API. Please consider keeping it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant