Skip to content

Commit

Permalink
add as_str getter
Browse files Browse the repository at this point in the history
  • Loading branch information
yggverse committed Jan 18, 2025
1 parent 90bff09 commit cac5440
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/client/connection/response/meta/data.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,13 @@ impl Data {
None => Err(Error::Protocol),
}
}

// Getters

/// Get `Self` as `std::str`
pub fn as_str(&self) -> &str {
self.0.as_str()
}
}

impl std::fmt::Display for Data {
Expand Down

0 comments on commit cac5440

Please sign in to comment.