#[non_exhaustive]
pub enum Kind {
Show 13 variants
PersonalDetails(String),
Passport {
data: String,
front_side: File,
selfie: File,
translation: Vec<File>,
},
DriverLicense {
data: String,
front_side: File,
reverse_side: File,
selfie: File,
translation: Vec<File>,
},
IdentityCard {
data: String,
front_side: File,
reverse_side: File,
selfie: File,
translation: Vec<File>,
},
InternalPassport {
data: String,
front_side: File,
selfie: File,
translation: Vec<File>,
},
Address(String),
UtilityBill {
files: Vec<File>,
translation: Vec<File>,
},
BankStatement {
files: Vec<File>,
translation: Vec<File>,
},
RentalAgreement {
files: Vec<File>,
translation: Vec<File>,
},
PassportRegistration {
files: Vec<File>,
translation: Vec<File>,
},
TemporaryRegistration {
files: Vec<File>,
translation: Vec<File>,
},
PhoneNumber(String),
Email(String),
}
Expand description
Represents different kinds of Element
.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
PersonalDetails(String)
The user’s personal details.
Passport
Fields
This variant is marked as non-exhaustive
The user’s passport.
DriverLicense
Fields
This variant is marked as non-exhaustive
The user’s driver license.
IdentityCard
Fields
This variant is marked as non-exhaustive
The user’s identity card.
InternalPassport
Fields
This variant is marked as non-exhaustive
The user’s internal passport.
Address(String)
The user’s address.
UtilityBill
Fields
This variant is marked as non-exhaustive
The user’s utility bill.
BankStatement
Fields
This variant is marked as non-exhaustive
The user’s bank statement.
RentalAgreement
Fields
This variant is marked as non-exhaustive
The user’s rental agreement.
PassportRegistration
Fields
This variant is marked as non-exhaustive
The user’s passport registration.
TemporaryRegistration
Fields
This variant is marked as non-exhaustive
The user’s temporary registration.
PhoneNumber(String)
The user’s phone number.
Email(String)
The user’s email.
Implementations§
source§impl Kind
impl Kind
sourcepub fn is_personal_details(&self) -> bool
pub fn is_personal_details(&self) -> bool
Returns true
if self
is of variant PersonalDetails
.
sourcepub fn expect_personal_details(self) -> Stringwhere
Self: Debug,
pub fn expect_personal_details(self) -> Stringwhere
Self: Debug,
Unwraps the value, yielding the content of PersonalDetails
.
Panics
Panics if the value is not PersonalDetails
, with a panic message including the content of self
.
sourcepub fn personal_details(self) -> Option<String>
pub fn personal_details(self) -> Option<String>
Returns Some
if self
is of variant PersonalDetails
, and None
otherwise.
sourcepub fn is_passport(&self) -> bool
pub fn is_passport(&self) -> bool
Returns true
if self
is of variant Passport
.
sourcepub fn is_driver_license(&self) -> bool
pub fn is_driver_license(&self) -> bool
Returns true
if self
is of variant DriverLicense
.
sourcepub fn is_identity_card(&self) -> bool
pub fn is_identity_card(&self) -> bool
Returns true
if self
is of variant IdentityCard
.
sourcepub fn is_internal_passport(&self) -> bool
pub fn is_internal_passport(&self) -> bool
Returns true
if self
is of variant InternalPassport
.
sourcepub fn is_address(&self) -> bool
pub fn is_address(&self) -> bool
Returns true
if self
is of variant Address
.
sourcepub fn expect_address(self) -> Stringwhere
Self: Debug,
pub fn expect_address(self) -> Stringwhere
Self: Debug,
sourcepub fn address(self) -> Option<String>
pub fn address(self) -> Option<String>
Returns Some
if self
is of variant Address
, and None
otherwise.
sourcepub fn is_utility_bill(&self) -> bool
pub fn is_utility_bill(&self) -> bool
Returns true
if self
is of variant UtilityBill
.
sourcepub fn is_bank_statement(&self) -> bool
pub fn is_bank_statement(&self) -> bool
Returns true
if self
is of variant BankStatement
.
sourcepub fn is_rental_agreement(&self) -> bool
pub fn is_rental_agreement(&self) -> bool
Returns true
if self
is of variant RentalAgreement
.
sourcepub fn is_passport_registration(&self) -> bool
pub fn is_passport_registration(&self) -> bool
Returns true
if self
is of variant PassportRegistration
.
sourcepub fn is_temporary_registration(&self) -> bool
pub fn is_temporary_registration(&self) -> bool
Returns true
if self
is of variant TemporaryRegistration
.
sourcepub fn is_phone_number(&self) -> bool
pub fn is_phone_number(&self) -> bool
Returns true
if self
is of variant PhoneNumber
.
sourcepub fn expect_phone_number(self) -> Stringwhere
Self: Debug,
pub fn expect_phone_number(self) -> Stringwhere
Self: Debug,
Unwraps the value, yielding the content of PhoneNumber
.
Panics
Panics if the value is not PhoneNumber
, with a panic message including the content of self
.
sourcepub fn phone_number(self) -> Option<String>
pub fn phone_number(self) -> Option<String>
Returns Some
if self
is of variant PhoneNumber
, and None
otherwise.