darling_core::from_meta

Trait KeyFromPath

Source
trait KeyFromPath: Sized {
    // Required methods
    fn from_path(path: &Path) -> Result<Self>;
    fn to_display(&self) -> Cow<'_, str>;
}
Expand description

Trait to convert from a path into an owned key for a map.

Required Methods§

Source

fn from_path(path: &Path) -> Result<Self>

Source

fn to_display(&self) -> Cow<'_, str>

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 KeyFromPath for Ident

Source§

fn from_path(path: &Path) -> Result<Self>

Source§

fn to_display(&self) -> Cow<'_, str>

Source§

impl KeyFromPath for Path

Source§

fn from_path(path: &Path) -> Result<Self>

Source§

fn to_display(&self) -> Cow<'_, str>

Source§

impl KeyFromPath for String

Source§

fn from_path(path: &Path) -> Result<Self>

Source§

fn to_display(&self) -> Cow<'_, str>

Implementors§