[][src]Macro stringly_conversions::impl_try_from_stringly_standard

macro_rules! impl_try_from_stringly_standard {
    ($type:ty) => { ... };
    ($type:ty, $module_suffix:ty) => { ... };
}

Calls impl_try_from_stringly!() with a set of standard stringly types.

A module is generated internally and its name is derived from the type name. This obviously fails when the type name is generic or contains other non-ident characters. In such case supply the macro with a second argument which is some unique identifier.

The currently supported types are:

  • &str - also supported in no_std
  • String
  • Cow<'_, str>,
  • Box<str>,
  • Box<Cow<'_, str>>,
  • Rc<str>,
  • Rc<String>,
  • Rc<Cow<'_, str>>,
  • Arc<str>,
  • Arc<String>,
  • Arc<Cow<'_, str>>,

Types from external crates:

  • serde_str_helpers::DeserBorrowStr