rtdlib
rtdlib is Rust types for TDLib.
This release is 1.8.69, generated from TDLib 1.8.69 commit 4c6377aa. It is the highest version of this crate. The older 0.8.x snapshot line and 1.8.0 / 1.8.1 (TDLib v1.8.0) are not current. Pin the version. See CHANGELOG.
Minimum supported Rust version: 1.89.
Usage
[]
= "=1.8.69"
The default crate contains TDLib types only. To call tdjson, enable sys. That re-exports rtdlib_sys::Tdlib and needs libtdjson at link time. rtdlib-sys is still 0.1.0.
[]
= { = "=1.8.69", = ["sys"] }
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!;
tdjson
With the sys feature:
use Tdlib;
let tdlib = new;
let request = r#"{"@type": "getMe"}"#;
tdlib.send;
Initialization parameters are fields of SetTdlibParameters. There is no TdlibParameters type.
td
Further protocol documentation is on the Telegram API site.
Security
Report vulnerabilities privately. See SECURITY.md.
Regenerating types
Types are generated in fantasy, not in this repository. From a fantasy checkout:
RTD_OUT=target/rtd-out
Copy target/rtd-out/src/types over src/types here.