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§
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
impl Eq for SetPassportDataErrors
Source§impl Hash for SetPassportDataErrors
impl Hash for SetPassportDataErrors
Source§impl PartialEq for SetPassportDataErrors
impl PartialEq for SetPassportDataErrors
Source§impl Payload for SetPassportDataErrors
impl Payload for SetPassportDataErrors
Source§const NAME: &'static str = "SetPassportDataErrors"
const NAME: &'static str = "SetPassportDataErrors"
Name of the Rust payload (for example,
EditMessageTextInline).Source§const TELEGRAM_METHOD: &'static str = Self::NAME
const TELEGRAM_METHOD: &'static str = Self::NAME
Case-insensitive Telegram method called on the wire (for example,
EditMessageText). Defaults to the payload name.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 StructuralPartialEq for SetPassportDataErrors
Auto Trait Implementations§
impl Forget for SetPassportDataErrors
impl Freeze for SetPassportDataErrors
impl Move for SetPassportDataErrors
impl RefUnwindSafe for SetPassportDataErrors
impl Send for SetPassportDataErrorswhere
RawVecInner: Send,
impl Sync for SetPassportDataErrorswhere
RawVecInner: Sync,
impl Unpin for SetPassportDataErrors
impl UnsafeUnpin for SetPassportDataErrors
impl UnwindSafe for SetPassportDataErrorswhere
RawVecInner: UnwindSafe,
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Erasable for T
impl<T> Erasable for T
Source§impl<P> HasPayload for Pwhere
P: Payload,
impl<P> HasPayload for Pwhere
P: Payload,
Source§fn payload_mut(&mut self) -> &mut P
fn payload_mut(&mut self) -> &mut P
Gain mutable access to the underlying payload.
Source§fn payload_ref(&self) -> &P
fn payload_ref(&self) -> &P
Gain immutable access to the underlying payload.
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more