mirror of
https://github.com/YGGverse/ggemini.git
synced 2026-04-02 18:15:37 +00:00
add as_str getter
This commit is contained in:
parent
90bff09269
commit
cac544043e
1 changed files with 7 additions and 0 deletions
|
|
@ -54,6 +54,13 @@ impl Data {
|
||||||
None => Err(Error::Protocol),
|
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 {
|
impl std::fmt::Display for Data {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue