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: UserIdUser identifier
errors: Vec<PassportElementError>A JSON-serialized array describing the errors
Implementations
sourceimpl SetPassportDataErrors
impl SetPassportDataErrors
pub fn new(
user_id: UserId,
errors: impl IntoIterator<Item = PassportElementError>
) -> Self
Trait Implementations
sourceimpl Clone for SetPassportDataErrors
impl Clone for SetPassportDataErrors
sourcefn clone(&self) -> SetPassportDataErrorsⓘNotable traits for SetPassportDataErrorsimpl Payload for SetPassportDataErrors type Output = True;
fn clone(&self) -> SetPassportDataErrorsⓘNotable traits for SetPassportDataErrorsimpl Payload for SetPassportDataErrors type Output = True;
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresourceimpl Debug for SetPassportDataErrors
impl Debug for SetPassportDataErrors
sourceimpl Hash for SetPassportDataErrors
impl Hash for SetPassportDataErrors
sourceimpl PartialEq<SetPassportDataErrors> for SetPassportDataErrors
impl PartialEq<SetPassportDataErrors> for SetPassportDataErrors
sourcefn eq(&self, other: &SetPassportDataErrors) -> bool
fn eq(&self, other: &SetPassportDataErrors) -> bool
sourceimpl Payload for SetPassportDataErrors
impl Payload for SetPassportDataErrors
sourcefn 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. Read moresourceimpl 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
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<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,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.