Struct teloxide::payloads::SetPassportDataErrors
source · pub struct SetPassportDataErrors {
pub user_id: UserId,
pub errors: Vec<PassportElementError, Global>,
}
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, Global>
A JSON-serialized array describing the errors
Implementations§
source§impl SetPassportDataErrors
impl SetPassportDataErrors
pub fn new( user_id: UserId, errors: impl IntoIterator<Item = <Vec<PassportElementError, Global> as IntoIterator>::Item> ) -> SetPassportDataErrors ⓘ
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
source§fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>( &self, __serializer: __S ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where __S: Serializer,
Serialize this value into the given Serde serializer. Read more
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.§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 as HasPayload>::Payload
fn payload_mut(&mut self) -> &mut <P as HasPayload>::Payload
Gain mutable access to the underlying payload.
source§fn payload_ref(&self) -> &<P as HasPayload>::Payload
fn payload_ref(&self) -> &<P as HasPayload>::Payload
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<P> SetPassportDataErrorsSetters for Pwhere
P: HasPayload<Payload = SetPassportDataErrors>,
impl<P> SetPassportDataErrorsSetters for Pwhere P: HasPayload<Payload = SetPassportDataErrors>,
source§fn errors<T>(self, value: T) -> Selfwhere
T: IntoIterator<Item = <Vec<PassportElementError, Global> as IntoIterator>::Item>,
fn errors<T>(self, value: T) -> Selfwhere T: IntoIterator<Item = <Vec<PassportElementError, Global> as IntoIterator>::Item>,
Setter for
errors
field.