fn item(
    link: String,
    class: &'static str,
    message: impl Into<Value>,
    icon: Option<&'static str>,
) -> Map<String, Value> {
    // Create map.
    let mut m: Map<String, Value> = Map::new();
    // Insert keys.
    m.insert(LINK.into(), link.into());
    m.insert(CLASS.into(), class.into());
    m.insert(MESSAGE.into(), message.into());
    if let Some(i) = icon {
        m.insert(ICON.into(), i.into());
    }
    // Return map.
    return m;
}
/// Create an item to add to an auth template.
Create an item to add to an auth template.
Create an item to add to an auth template .
fn item(
    link: String,
    class: &'static str,
    message: impl Into<Value>,
    icon: Option<&'static str>,
) -> Map<String, Value> {
    // Create map.
    let mut m: Map<String, Value> = Map::new();
    // Insert keys.
    m.insert(LINK.into(), link.into());
    m.insert(CLASS.into(), class.into());
    m.insert(MESSAGE.into(), message.into());
    if let Some(i) = icon {
        m.insert(ICON.into(), i.into());
    }
    // Return map.
    return m;
}
fn item ( link : String , class : & ' static str , message : impl Into < Value > , icon : Option < & ' static str > , ) -> Map < String , Value > { // Create map. let mut m : Map < String , Value > = Map :: new ( ) ; // Insert keys. m . insert ( LINK . into ( ) , link . into ( ) ) ; m . insert ( CLASS . into ( ) , class . into ( ) ) ; m . insert ( MESSAGE . into ( ) , message . into ( ) ) ; if let Some ( i ) = icon { m . insert ( ICON . into ( ) , i . into ( ) ) ; } // Return map. return m ; }
Create an item to add to an auth template.
Create an item to add to an auth template .
link
String
class
&'static str
message
impl Into<Value>
icon
Option<&'static str>
link
String
class
&'static str
message
impl Into<Value>
icon
Option<&'static str>