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>

Object Safety§

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§