Skip to main content

ExpandableLanguageMap

Trait ExpandableLanguageMap 

Source
pub trait ExpandableLanguageMap {
    // Required method
    fn to_expanded_language_map<V: JsonValue>(&self) -> V;
}
Expand description

Renders a field tagged #[jsonld(container = "language")].

Implemented here for HashMap and BTreeMap whose keys and values are both AsRef<str>, which covers the ordinary language map of tag to text. A language that carries several strings, or values that are not strings, needs its own implementation.

Required Methods§

Source

fn to_expanded_language_map<V: JsonValue>(&self) -> V

Renders the map in expanded language-map form: a JSON array of {"@value": ..., "@language": ...} objects in the chosen backend V.

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<K: AsRef<str>, T: AsRef<str>, S> ExpandableLanguageMap for HashMap<K, T, S>

Source§

impl<K: AsRef<str>, T: AsRef<str>> ExpandableLanguageMap for BTreeMap<K, T>

Implementors§