[−][src]Struct json_gettext::JSONGetTextBuilder
To build a JSONGetText instance, this struct can help you do that step by step.
Methods
impl<'a, 'e> JSONGetTextBuilder<'a>
[src]
pub fn new<S: Into<String>>(default_key: S) -> JSONGetTextBuilder<'a>
[src]
Create a new JSONGetTextBuilder instance. You need to decide your default key at the stage.
pub fn from_default_key_str<S: AsRef<str>>(
default_key: S
) -> JSONGetTextBuilder<'a>
[src]
default_key: S
) -> JSONGetTextBuilder<'a>
please use new
instead
Create a new JSONGetTextBuilder instance. You need to decide your default key at the stage.
pub fn from_default_key_string(default_key: String) -> JSONGetTextBuilder<'a>
[src]
please use new
instead
Create a new JSONGetTextBuilder instance. You need to decide your default key at the stage.
pub fn add_json_string_to_context<K: Into<String>, J: AsRef<str>>(
&mut self,
key: K,
json: J
) -> Result<&Self, JSONGetTextBuilderError>
[src]
&mut self,
key: K,
json: J
) -> Result<&Self, JSONGetTextBuilderError>
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<K: Into<String> + 'e, J: ?Sized + AsRef<[u8]>>(
&mut self,
key: K,
json: &J
) -> Result<&Self, JSONGetTextBuilderError>
[src]
&mut self,
key: K,
json: &J
) -> Result<&Self, JSONGetTextBuilderError>
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<K: Into<String> + 'e, P: AsRef<Path>>(
&mut self,
key: K,
path: P
) -> Result<&Self, JSONGetTextBuilderError>
[src]
&mut self,
key: K,
path: P
) -> Result<&Self, JSONGetTextBuilderError>
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<K: Into<String> + 'e>(
&mut self,
key: K,
map: HashMap<String, JSONGetTextValue<'a>>
) -> Result<&Self, JSONGetTextBuilderError>
[src]
&mut self,
key: K,
map: HashMap<String, JSONGetTextValue<'a>>
) -> Result<&Self, JSONGetTextBuilderError>
Add a map to the context.
pub fn build(self) -> Result<JSONGetText<'a>, JSONGetTextError>
[src]
Build a JSONGetText instance.
Trait Implementations
impl<'a> Clone for JSONGetTextBuilder<'a>
[src]
fn clone(&self) -> JSONGetTextBuilder<'a>
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl<'a> Debug for JSONGetTextBuilder<'a>
[src]
Auto Trait Implementations
impl<'a> Send for JSONGetTextBuilder<'a>
impl<'a> Sync for JSONGetTextBuilder<'a>
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,