pub trait ToTeaLeafExt: ToTeaLeaf + Sized {
// Provided methods
fn to_tealeaf_doc(&self, key: &str) -> TeaLeaf { ... }
fn to_tl_string(&self, key: &str) -> String { ... }
fn to_tlbx(
&self,
key: &str,
path: impl AsRef<Path>,
compress: bool,
) -> Result<()> { ... }
fn to_tealeaf_json(&self, key: &str) -> Result<String> { ... }
}Expand description
Extension trait providing convenience methods on types implementing ToTeaLeaf.
Provided Methods§
Sourcefn to_tealeaf_doc(&self, key: &str) -> TeaLeaf
fn to_tealeaf_doc(&self, key: &str) -> TeaLeaf
Convert to a TeaLeaf document with a single root entry.
Sourcefn to_tl_string(&self, key: &str) -> String
fn to_tl_string(&self, key: &str) -> String
Convert to TeaLeaf text format string.
Sourcefn to_tlbx(
&self,
key: &str,
path: impl AsRef<Path>,
compress: bool,
) -> Result<()>
fn to_tlbx( &self, key: &str, path: impl AsRef<Path>, compress: bool, ) -> Result<()>
Compile to binary .tlbx format.
Sourcefn to_tealeaf_json(&self, key: &str) -> Result<String>
fn to_tealeaf_json(&self, key: &str) -> Result<String>
Convert to JSON string (pretty-printed).
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.