Trait KeySpecifierComponentViaDisplayFromStr

pub(crate) trait KeySpecifierComponentViaDisplayFromStr: Display + FromStr { }
Expand description

Implement KeySpecifierComponent in terms of Display and FromStr (helper trait)

The default from_slug implementation maps any errors returned from FromStr to [InvalidKeyPathComponentValue::Bug]. Key specifier components that cannot readily be parsed from a string should have a bespoke from_slug implementation, and return more descriptive errors through [InvalidKeyPathComponentValue::Slug].

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.

Implementors§