Skip to content

Commit

Permalink
Impl AsRef<str> for HeaderName
Browse files Browse the repository at this point in the history
Signed-off-by: Matthias Beyer <[email protected]>
  • Loading branch information
matthiasbeyer authored and caspervonb committed Apr 13, 2023
1 parent 8d0803c commit ce7f825
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 @@ -317,6 +317,12 @@ impl AsRef<[u8]> for HeaderName {
}
}

impl AsRef<str> for HeaderName {
fn as_ref(&self) -> &str {
self.value.as_ref()
}
}

#[derive(Debug, Clone)]
pub struct ParseError;

Expand Down

0 comments on commit ce7f825

Please sign in to comment.