TdlibParameters

Struct TdlibParameters 

Source
pub struct TdlibParameters {
Show 15 fields pub use_test_dc: bool, pub database_directory: String, pub files_directory: String, pub use_file_database: bool, pub use_chat_info_database: bool, pub use_message_database: bool, pub use_secret_chats: bool, pub api_id: i32, pub api_hash: String, pub system_language_code: String, pub device_model: String, pub system_version: String, pub application_version: String, pub enable_storage_optimizer: bool, pub ignore_file_names: bool,
}
Expand description

Contains parameters for TDLib initialization

Fields§

§use_test_dc: bool

If set to true, the Telegram test environment will be used instead of the production environment

§database_directory: String

The path to the directory for the persistent database; if empty, the current working directory will be used

§files_directory: String

The path to the directory for storing files; if empty, database_directory will be used

§use_file_database: bool

If set to true, information about downloaded and uploaded files will be saved between application restarts

§use_chat_info_database: bool

If set to true, the library will maintain a cache of users, basic groups, supergroups, channels and secret chats. Implies use_file_database

§use_message_database: bool

If set to true, the library will maintain a cache of chats and messages. Implies use_chat_info_database

§use_secret_chats: bool

If set to true, support for secret chats will be enabled

§api_id: i32

Application identifier for Telegram API access, which can be obtained at https://my.telegram.org

§api_hash: String

Application identifier hash for Telegram API access, which can be obtained at https://my.telegram.org

§system_language_code: String

IETF language tag of the user’s operating system language; must be non-empty

§device_model: String

Model of the device the application is being run on; must be non-empty

§system_version: String

Version of the operating system the application is being run on; must be non-empty

§application_version: String

Application version; must be non-empty

§enable_storage_optimizer: bool

If set to true, old files will automatically be deleted

§ignore_file_names: bool

If set to true, original file names will be ignored. Otherwise, downloaded files will be saved under names as close as possible to the original name

Trait Implementations§

Source§

impl Clone for TdlibParameters

Source§

fn clone(&self) -> TdlibParameters

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for TdlibParameters

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for TdlibParameters

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for TdlibParameters

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,