pub trait ToConfigNamePath: Sized {
type Output: Borrow<ConfigNamePathBuf> + Into<ConfigNamePathBuf>;
// Required method
fn into_name_path(self) -> Self::Output;
}
Expand description
Value that can be converted to a dotted config name path.
This is an abstraction to specify a config name path in either a string or a
parsed form. It’s similar to Into<T>
, but the output type T
is
constrained by the source type.
Required Associated Types§
Sourcetype Output: Borrow<ConfigNamePathBuf> + Into<ConfigNamePathBuf>
type Output: Borrow<ConfigNamePathBuf> + Into<ConfigNamePathBuf>
Path type to be converted from Self
.
Required Methods§
Sourcefn into_name_path(self) -> Self::Output
fn into_name_path(self) -> Self::Output
Converts this object into a dotted config name path.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.
Implementations on Foreign Types§
Source§impl ToConfigNamePath for &'static str
impl ToConfigNamePath for &'static str
Source§fn into_name_path(self) -> Self::Output
fn into_name_path(self) -> Self::Output
Parses this string into a dotted config name path.
The string must be a valid TOML dotted key. A static str is required to prevent API misuse.