Skip to main content

KeySpecifierComponentViaDisplayFromStr

Trait KeySpecifierComponentViaDisplayFromStr 

Source
pub 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".

Implementations on Foreign Types§

Source§

impl KeySpecifierComponentViaDisplayFromStr for HsNickname

Implementors§