rtdlib
rtdlib is td for rust.
rtdlib crate have td type (classes).
Usage
[]
= "1.8.*"
The default, rtdlib only have td types, not have call tdjson dylib, if you want , you need add features to your dependency.
[]
= { = "1.8.*", = "sys" }
version
Please read: version
Example
types
let json = r#"{"@type":"updateAuthorizationState","authorization_state":{"@type":"authorizationStateWaitTdlibParameters"}}"#;
let state: UpdateAuthorizationState = from_str.expect;
assert_eq!;
let rjson = state.to_json;
assert!;
assert_eq!;
tdjson
If you enable sys features, you can use Tdlib to call tdjson dylib.
use Tdlib;
let tdlib = new;
let request = r#"{"@type": "getMe"}"#;
tdlib.send;
td
More document you need check telegram api