[−][src]Function serde_ltsv::from_str
pub fn from_str<'a, T>(value: &'a str) -> Result<T, LtsvError> where
T: Deserialize<'a>,
Deserialize an instance of type T
from a string of LTSV text.
Example
#[derive(Deserialize, Debug)] struct Foo { a: String, b: i8, c: bool, } let line = "a:Test\tb:8\tc:false"; let foo: Foo = serde_ltsv::from_str(&line).unwrap(); println!("{:?}", &foo);
Output:
Foo { a: "Test", b: 8, c: false }