Struct json_gettext::JSONGetTextBuilder [−][src]
pub struct JSONGetTextBuilder { /* fields omitted */ }
To build a JSONGetText instance, this struct can help you do that step by step.
Methods
impl JSONGetTextBuilder
[src]
impl JSONGetTextBuilder
pub fn new(default_key: &str) -> JSONGetTextBuilder
[src]
pub fn new(default_key: &str) -> JSONGetTextBuilder
Create a new JSONGetTextBuilder instance. You need to decide your default key at the stage.
pub fn add_json_string_to_context(
&mut self,
key: &str,
json: &str
) -> Result<&Self, String>
[src]
pub fn add_json_string_to_context(
&mut self,
key: &str,
json: &str
) -> Result<&Self, String>
Add a JSON string to the context for a specify key. The JSON string must represent an object (key-value).
pub fn add_json_bytes_to_context(
&mut self,
key: &str,
json: &[u8]
) -> Result<&Self, String>
[src]
pub fn add_json_bytes_to_context(
&mut self,
key: &str,
json: &[u8]
) -> Result<&Self, String>
Add JSON binary data to the context for a specify key. The JSON binary data must represent an object (key-value).
pub fn add_json_file_to_context<P: AsRef<Path>>(
&mut self,
key: &str,
path: P
) -> Result<&Self, String>
[src]
pub fn add_json_file_to_context<P: AsRef<Path>>(
&mut self,
key: &str,
path: P
) -> Result<&Self, String>
Add JSON binary data from a file to the context for a specify key. The JSON binary data must represent an object (key-value).
pub fn add_map_to_context<P: AsRef<Path>>(
&mut self,
key: &str,
map: HashMap<String, String>
) -> Result<&Self, String>
[src]
pub fn add_map_to_context<P: AsRef<Path>>(
&mut self,
key: &str,
map: HashMap<String, String>
) -> Result<&Self, String>
Add a map to the context.
pub fn build(self) -> Result<JSONGetText, String>
[src]
pub fn build(self) -> Result<JSONGetText, String>
Build a JSONGetText instance.
Trait Implementations
impl Debug for JSONGetTextBuilder
[src]
impl Debug for JSONGetTextBuilder
Auto Trait Implementations
impl Send for JSONGetTextBuilder
impl Send for JSONGetTextBuilder
impl Sync for JSONGetTextBuilder
impl Sync for JSONGetTextBuilder