Skip to content

Commit

Permalink
Impl From<HeaderName> for String
Browse files Browse the repository at this point in the history
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
  • Loading branch information
matthiasbeyer committed Apr 13, 2023
1 parent 8d0803c commit 6183ae6
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions async-nats/src/header.rs
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,12 @@ impl FromStr for HeaderName {
}
}

impl From<HeaderName> for String {
fn from(hn: HeaderName) -> Self {
hn.value
}
}

impl AsRef<[u8]> for HeaderName {
fn as_ref(&self) -> &[u8] {
self.value.as_bytes()
Expand Down

0 comments on commit 6183ae6

Please sign in to comment.