diff --git a/crates/toml_edit/src/key.rs b/crates/toml_edit/src/key.rs index 15fdd4de..352911dc 100644 --- a/crates/toml_edit/src/key.rs +++ b/crates/toml_edit/src/key.rs @@ -53,7 +53,10 @@ impl Key { Self::try_parse_path(repr) } - pub(crate) fn with_repr_unchecked(mut self, repr: Repr) -> Self { + /// While creating the `Key`, add `Repr` to it + /// + /// Useful in custom parsers. + pub fn with_repr_unchecked(mut self, repr: Repr) -> Self { self.repr = Some(repr); self } diff --git a/crates/toml_edit/src/repr.rs b/crates/toml_edit/src/repr.rs index 80d78c38..d0419314 100644 --- a/crates/toml_edit/src/repr.rs +++ b/crates/toml_edit/src/repr.rs @@ -141,7 +141,10 @@ pub struct Repr { } impl Repr { - pub(crate) fn new_unchecked(raw: impl Into) -> Self { + /// Create a new TOML-encoded value + /// + /// Useful in custom parsers. + pub fn new_unchecked(raw: impl Into) -> Self { Repr { raw_value: raw.into(), }