Skip to content

Commit

Permalink
tonic: Unhide docs for Ascii and Binary, so Rustdoc shows various met…
Browse files Browse the repository at this point in the history
…hods.

MetadataValue::from<i16> and other numeric types aren't showni n Rustdoc, because they're implemented for Metadata<Ascii>, and Ascii is hidden.
  • Loading branch information
Adam Chalmers committed May 2, 2022
1 parent 2112ecc commit d648c96
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tonic/src/metadata/encoding.rs
Expand Up @@ -51,11 +51,13 @@ pub trait ValueEncoding: Clone + Eq + PartialEq + Hash + self::value_encoding::S
fn is_valid_key(key: &str) -> bool;
}

/// gRPC metadata values can be either ASCII strings or binary. Note that only
/// visible ASCII characters (32-127) are permitted.
#[derive(Clone, Debug, Eq, PartialEq, Hash)]
#[doc(hidden)]
pub enum Ascii {}

/// gRPC metadata values can be either ASCII strings or binary.
#[derive(Clone, Debug, Eq, PartialEq, Hash)]
#[doc(hidden)]
pub enum Binary {}

// ===== impl ValueEncoding =====
Expand Down

0 comments on commit d648c96

Please sign in to comment.