We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent da667e8 commit ffdd211Copy full SHA for ffdd211
crates/toml/src/de/parser/devalue.rs
@@ -35,9 +35,19 @@ impl DeInteger<'_> {
35
i128::from_str_radix(self.inner.as_ref(), self.radix).ok()
36
}
37
38
- pub(crate) fn as_str(&self) -> &str {
+ /// [`from_str_radix`][i64::from_str_radix]-compatible representation of an integer
39
+ ///
40
+ /// Requires [`DeInteger::radix`] to interpret
41
42
+ /// See [`Display`][std::fmt::Display] for a representation that includes the radix
43
+ pub fn as_str(&self) -> &str {
44
self.inner.as_ref()
45
46
+
47
+ /// Numeric base of [`DeInteger::as_str`]
48
+ pub fn radix(&self) -> u32 {
49
+ self.radix
50
+ }
51
52
53
impl Default for DeInteger<'_> {
0 commit comments