Struct botapi::gen_types::EncryptedCredentials
source · pub struct EncryptedCredentials {
pub data: String,
pub hash: String,
pub secret: String,
}
Expand description
Describes data required for decrypting and authenticating EncryptedPassportElement. See the Telegram Passport Documentation for a complete description of the data decryption and authentication processes.
Fields§
§data: String
Base64-encoded encrypted JSON-serialized data with unique user’s payload, data hashes and secrets required for EncryptedPassportElement decryption and authentication
hash: String
Base64-encoded data hash for data authentication
secret: String
Base64-encoded secret, encrypted with the bot’s public RSA key, required for data decryption
Implementations§
source§impl EncryptedCredentials
impl EncryptedCredentials
pub fn noskip(self) -> NoSkipEncryptedCredentials
source§impl EncryptedCredentials
impl EncryptedCredentials
pub fn new(data: String, hash: String, secret: String) -> Self
sourcepub fn get_data<'a>(&'a self) -> &'a str
pub fn get_data<'a>(&'a self) -> &'a str
Base64-encoded encrypted JSON-serialized data with unique user’s payload, data hashes and secrets required for EncryptedPassportElement decryption and authentication
sourcepub fn set_data<'a>(&'a mut self, data: String) -> &'a mut Self
pub fn set_data<'a>(&'a mut self, data: String) -> &'a mut Self
Base64-encoded encrypted JSON-serialized data with unique user’s payload, data hashes and secrets required for EncryptedPassportElement decryption and authentication
sourcepub fn set_hash<'a>(&'a mut self, hash: String) -> &'a mut Self
pub fn set_hash<'a>(&'a mut self, hash: String) -> &'a mut Self
Base64-encoded data hash for data authentication
sourcepub fn get_secret<'a>(&'a self) -> &'a str
pub fn get_secret<'a>(&'a self) -> &'a str
Base64-encoded secret, encrypted with the bot’s public RSA key, required for data decryption
sourcepub fn set_secret<'a>(&'a mut self, secret: String) -> &'a mut Self
pub fn set_secret<'a>(&'a mut self, secret: String) -> &'a mut Self
Base64-encoded secret, encrypted with the bot’s public RSA key, required for data decryption
Trait Implementations§
source§impl Clone for EncryptedCredentials
impl Clone for EncryptedCredentials
source§fn clone(&self) -> EncryptedCredentials
fn clone(&self) -> EncryptedCredentials
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for EncryptedCredentials
impl Debug for EncryptedCredentials
source§impl Default for EncryptedCredentials
impl Default for EncryptedCredentials
source§fn default() -> EncryptedCredentials
fn default() -> EncryptedCredentials
source§impl<'de> Deserialize<'de> for EncryptedCredentials
impl<'de> Deserialize<'de> for EncryptedCredentials
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
source§impl From<BoxWrapper<Box<EncryptedCredentials>>> for EncryptedCredentials
impl From<BoxWrapper<Box<EncryptedCredentials>>> for EncryptedCredentials
source§fn from(t: BoxWrapper<Box<EncryptedCredentials>>) -> Self
fn from(t: BoxWrapper<Box<EncryptedCredentials>>) -> Self
source§impl From<BoxWrapper<Unbox<EncryptedCredentials>>> for EncryptedCredentials
impl From<BoxWrapper<Unbox<EncryptedCredentials>>> for EncryptedCredentials
source§fn from(t: BoxWrapper<Unbox<EncryptedCredentials>>) -> Self
fn from(t: BoxWrapper<Unbox<EncryptedCredentials>>) -> Self
source§impl From<NoSkipEncryptedCredentials> for EncryptedCredentials
impl From<NoSkipEncryptedCredentials> for EncryptedCredentials
source§fn from(t: NoSkipEncryptedCredentials) -> Self
fn from(t: NoSkipEncryptedCredentials) -> Self
source§impl Hash for EncryptedCredentials
impl Hash for EncryptedCredentials
source§impl Into<NoSkipEncryptedCredentials> for EncryptedCredentials
impl Into<NoSkipEncryptedCredentials> for EncryptedCredentials
source§fn into(self) -> NoSkipEncryptedCredentials
fn into(self) -> NoSkipEncryptedCredentials
source§impl Ord for EncryptedCredentials
impl Ord for EncryptedCredentials
source§fn cmp(&self, other: &EncryptedCredentials) -> Ordering
fn cmp(&self, other: &EncryptedCredentials) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
source§impl PartialEq for EncryptedCredentials
impl PartialEq for EncryptedCredentials
source§fn eq(&self, other: &EncryptedCredentials) -> bool
fn eq(&self, other: &EncryptedCredentials) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for EncryptedCredentials
impl PartialOrd for EncryptedCredentials
source§fn partial_cmp(&self, other: &EncryptedCredentials) -> Option<Ordering>
fn partial_cmp(&self, other: &EncryptedCredentials) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moresource§impl Serialize for EncryptedCredentials
impl Serialize for EncryptedCredentials
impl Eq for EncryptedCredentials
impl StructuralPartialEq for EncryptedCredentials
Auto Trait Implementations§
impl Freeze for EncryptedCredentials
impl RefUnwindSafe for EncryptedCredentials
impl Send for EncryptedCredentials
impl Sync for EncryptedCredentials
impl Unpin for EncryptedCredentials
impl UnwindSafe for EncryptedCredentials
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.