Struct json_gettext::JSONGetText [−][src]
pub struct JSONGetText { /* fields omitted */ }
A wrapper for context and a default key. Keys usually be considered as locales.
Methods
impl JSONGetText
[src]
impl JSONGetText
pub fn build(default_key: &str) -> JSONGetTextBuilder
[src]
pub fn build(default_key: &str) -> JSONGetTextBuilder
Create a new JSONGetTextBuilder instance. You need to decide your default key at the stage.
pub fn from_context(
default_key: &str,
context: HashMap<String, HashMap<String, String>>
) -> Result<JSONGetText, String>
[src]
pub fn from_context(
default_key: &str,
context: HashMap<String, HashMap<String, String>>
) -> Result<JSONGetText, String>
Create a new JSONGetText instance with context and a default key.
pub fn get_keys(&self) -> Keys<String, HashMap<String, String>>
[src]
pub fn get_keys(&self) -> Keys<String, HashMap<String, String>>
Get all keys in context.
pub fn get_default_key(&self) -> &str
[src]
pub fn get_default_key(&self) -> &str
Get the default key.
pub fn get(&self, key: &str) -> Option<&HashMap<String, String>>
[src]
pub fn get(&self, key: &str) -> Option<&HashMap<String, String>>
Get a string map from context by a key.
pub fn get_text(&self, text: &str) -> Option<&str>
[src]
pub fn get_text(&self, text: &str) -> Option<&str>
Get text from context.
pub fn get_text_with_key(&self, key: &str, text: &str) -> Option<&str>
[src]
pub fn get_text_with_key(&self, key: &str, text: &str) -> Option<&str>
Get text from context with a specific key.
Trait Implementations
impl Debug for JSONGetText
[src]
impl Debug for JSONGetText
Auto Trait Implementations
impl Send for JSONGetText
impl Send for JSONGetText
impl Sync for JSONGetText
impl Sync for JSONGetText