Struct teloxide_core::payloads::SetPassportDataErrors
source · pub struct SetPassportDataErrors {
pub user_id: UserId,
pub errors: Vec<PassportElementError>,
}
Expand description
Informs a user that some of the Telegram Passport elements they provided contains errors. The user will not be able to re-submit their Passport to you until the errors are fixed (the contents of the field for which you returned the error must change). Returns True on success.
Use this if the data submitted by the user doesn’t satisfy the standards your service requires for any reason. For example, if a birthday date seems invalid, a submitted document is blurry, a scan shows evidence of tampering, etc. Supply some details in the error message to make sure the user knows how to correct the issues.
Fields§
§user_id: UserId
User identifier
errors: Vec<PassportElementError>
A JSON-serialized array describing the errors
Implementations§
source§impl SetPassportDataErrors
impl SetPassportDataErrors
pub fn new( user_id: UserId, errors: impl IntoIterator<Item = PassportElementError> ) -> Self
Trait Implementations§
source§impl Clone for SetPassportDataErrors
impl Clone for SetPassportDataErrors
source§impl Debug for SetPassportDataErrors
impl Debug for SetPassportDataErrors
source§impl Hash for SetPassportDataErrors
impl Hash for SetPassportDataErrors
source§impl PartialEq<SetPassportDataErrors> for SetPassportDataErrors
impl PartialEq<SetPassportDataErrors> for SetPassportDataErrors
source§fn eq(&self, other: &SetPassportDataErrors) -> bool
fn eq(&self, other: &SetPassportDataErrors) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Payload for SetPassportDataErrors
impl Payload for SetPassportDataErrors
source§fn timeout_hint(&self) -> Option<Duration>
fn timeout_hint(&self) -> Option<Duration>
If this payload may take long time to execute (e.g.
GetUpdates
with
big timeout
), the minimum timeout that should be used.source§impl Serialize for SetPassportDataErrors
impl Serialize for SetPassportDataErrors
impl Eq for SetPassportDataErrors
impl StructuralEq for SetPassportDataErrors
impl StructuralPartialEq for SetPassportDataErrors
Auto Trait Implementations§
impl RefUnwindSafe for SetPassportDataErrors
impl Send for SetPassportDataErrors
impl Sync for SetPassportDataErrors
impl Unpin for SetPassportDataErrors
impl UnwindSafe for SetPassportDataErrors
Blanket Implementations§
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.