User

Struct User 

Source
pub struct User {
Show 67 fields pub id: u64, pub first_name: String, pub last_name: String, pub deactivated: Option<String>, pub is_closed: bool, pub can_access_closed: bool, pub about: Option<String>, pub activities: Option<String>, pub dbate: Option<String>, pub blacklisted: Option<u8>, pub blacklisted_by_me: Option<u8>, pub books: Option<String>, pub can_post: Option<u8>, pub can_see_all_posts: Option<u8>, pub can_see_audio: Option<u8>, pub can_send_friend_request: Option<u8>, pub can_write_private_message: Option<u8>, pub career: Option<Career>, pub city: Option<City>, pub common_count: Option<u64>, pub connections: Option<Value>, pub contacts: Option<Contacts>, pub counters: Option<Counters>, pub country: Option<Country>, pub crop_photo: Option<Value>, pub domain: Option<String>, pub education: Option<Education>, pub exports: Option<Value>, pub first_name_nom: Option<String>, pub first_name_gen: Option<String>, pub first_name_dat: Option<String>, pub first_name_acc: Option<String>, pub first_name_ins: Option<String>, pub first_name_abl: Option<String>, pub followers_count: Option<u64>, pub friend_status: Option<u64>, pub games: Option<String>, pub has_mobile: Option<bool>, pub has_photo: Option<u64>, pub home_town: Option<String>, pub interests: Option<String>, pub is_favorite: Option<u64>, pub is_friend: Option<u64>, pub is_hidden_from_feed: Option<u64>, pub last_name_nom: Option<String>, pub last_name_gen: Option<String>, pub last_name_dat: Option<String>, pub last_name_acc: Option<String>, pub last_name_ins: Option<String>, pub last_name_abl: Option<String>, pub last_seen: Option<LastSeen>, pub lists: Option<String>, pub maiden_name: Option<String>, pub military: Option<Military>, pub movies: Option<String>, pub music: Option<String>, pub nickname: Option<String>, pub occupation: Option<Occupation>, pub online: Option<u64>, pub screen_name: Option<String>, pub sex: Option<u64>, pub site: Option<String>, pub status: Option<String>, pub trending: Option<u64>, pub tv: Option<String>, pub verified: Option<u64>, pub wall_default: Option<String>,
}
Expand description

The object contains information about the VKontakte user. The set of fields can change depending on the method called and the parameters transmitted in it.

Note that all fields use information about the current user (e.g., blacklisted_by_me require a user access key to be passed in the request, even if the method itself can be invoked without an access key.

Fields§

§id: u64

User ID

§first_name: String

First name

§last_name: String

Last name

§deactivated: Option<String>

The field is returned if the user’s page is deleted or blocked, contains a value deleted or banned

§is_closed: bool

Whether the user profile is hidden by privacy settings

§can_access_closed: bool

Can the current user see the profile is_closed = 1 (They are friends)

§about: Option<String>

Here comes optional fields that are not always included in respons

The content of the field “ABOUT yourself” from the profile

§activities: Option<String>

Content of the Activity field from the profile

§dbate: Option<String>

Date of birth. Returns in D.M.YYYY or D.M format (if birth year is hidden). If the date of birth is hidden in its entirety, the field is missing from the answer

§blacklisted: Option<u8>

Information about whether the current user is blacklisted. Possible values:

  • 1 if the user is blacklisted.
  • 0 if the user is not blacklisted.
§blacklisted_by_me: Option<u8>

Information about whether the user is blacklisted from the current user. Possible values:

  • 1 if it is
  • 0 if it isn’t
§books: Option<String>

The content of the “Favorite Books” field from the user profile

§can_post: Option<u8>

Information about whether the current user can leave records on the wall. Possible values:

  • 1 if maybe he can
  • 0 if he can’t
§can_see_all_posts: Option<u8>

Information about whether the current user can see someone else’s records on the wall. Possible values:

  • 1 if maybe he can
  • 0 if he can’t
§can_see_audio: Option<u8>

Information about whether the current user can see the audio recordings. Possible values:

  • 1 if maybe he can
  • 0 if he can’t
§can_send_friend_request: Option<u8>

Information about whether a notification will be sent to the user about the friend request from the current user. Possible values:

  • 1 notification will be sent
  • 0 notification will not be sent
§can_write_private_message: Option<u8>

Information about whether the current user can send a private message. Possible values:

  • 1 if maybe he can
  • 0 if maybe he can’t
§career: Option<Career>

Information about the user’s career. An object containing the following fields

§city: Option<City>

Information about the city indicated on the user’s page in the section “Contacts”.

§common_count: Option<u64>

Shared friends with current user

§connections: Option<Value>

Returns data about the services specified in the user profile, such as: skype, livejournal. For each service, a separate field with a string type containing the username of the user is returned. For example, “skype”: “username”

§contacts: Option<Contacts>

Information about the user’s phone numbers. If the data is specified and not hidden by the privacy settings

§counters: Option<Counters>

The number of different objects of the user. The field only returns in method users.get when requesting information about one user, with the transfer of user information access_token.

§country: Option<Country>

Information about the country indicated on the user’s page in the section “Contacts”.

§crop_photo: Option<Value>

Returns data on the points at which profile and miniature photos of the user are cut, if available

§domain: Option<String>

Short address of the page. A line containing a short page address is returned (e.g., andrew ). If he is not appointed, he shall return “id” + user_id , for example: id35828305

§education: Option<Education>

Information about the higher educational institution of the user

§exports: Option<Value>

External services to which exports from VK are configured livejournal.

§first_name_nom: Option<String>

Name in nominative case (e.g., “Alexander”).

§first_name_gen: Option<String>

Name in genitive case (e.g., “Alexandera”).

§first_name_dat: Option<String>

Name in dative case (e.g., “Alexandru”).

§first_name_acc: Option<String>

Name in accusative case (e.g., “Alexandra”).

§first_name_ins: Option<String>

Name in instrumental case (e.g., “Alexandrom”).

§first_name_abl: Option<String>

Name in prepositional case (e.g., “Alexandre”).

§followers_count: Option<u64>

Number of subscribers of the user

§friend_status: Option<u64>

Friendship status with the user. Possible values:

  • 0 if it’s not a friend
  • 1 if sent an application / subscription to the user
  • 2 if there is an incoming application / subscription from the user
  • 3 if is a friend
§games: Option<String>

Content of the “Favorite Games” field from the profile

§has_mobile: Option<bool>

Information about whether the user’s mobile phone number is known. Return values:

  • 1 if known
  • 0 if unknown
§has_photo: Option<u64>

Information about whether the user has set a profile photo. Return values:

  • 1 if established
  • 0 if didn’t
§home_town: Option<String>

Name of hometown

§interests: Option<String>

Content of the “Interesa” field from the profile

§is_favorite: Option<u64>

Information about whether the user is bookmarked by the current user. Possible values:

  • 1 if it’s
  • 0 if it’s not
§is_friend: Option<u64>

Information about whether the user is a friend of the current user. Possible values:

  • 1 if true
  • 0 if false
§is_hidden_from_feed: Option<u64>

Information about whether the user is hidden from the news feed of the current user. Possible values:

  • 1 if true
  • 0 if false
§last_name_nom: Option<String>

Is the profile indexed by search sites?? Possible values:

  • 1 if profile is hidden from search sites
  • 0 if profile is available to search sites. (IN privacy settings: https://vk.com/settings?act=privacy, in the item “Who can see my page on the Internet“, the value “Everyone” is selected

Optional fields L-R

Name in nominative case (e.g., “Alexander”)

§last_name_gen: Option<String>

Name in genitive case (e.g., “Alexandera”)

§last_name_dat: Option<String>

Name in dative case (e.g., “Alexandru”)

§last_name_acc: Option<String>

Name in accusative case (e.g., “Alexandra”)

§last_name_ins: Option<String>

Name in instrumental case (e.g., “Alexandrom”)

§last_name_abl: Option<String>

Name in prepositional case (e.g., “Alexandre”)

§last_seen: Option<LastSeen>

Time of last visit

§lists: Option<String>

The comma-separated identifiers of the user’s friend lists. The field is only available for the method friends.get

§maiden_name: Option<String>

My maiden name

§military: Option<Military>

Information about the military service of the user

§movies: Option<String>

The content of the “Favorite Movies” field from the user profile

§music: Option<String>

The content of the field “Favorite music” from the user profile

§nickname: Option<String>

Nickname of the user

§occupation: Option<Occupation>

Information about the current type of user activity

§online: Option<u64>

Information about whether the user is currently on the site. If the user uses a mobile application or mobile version, an additional field is returned online_mobile which contains 1 . In this case, if the application is used, the field is additionally returned. online_app containing its identifier

§screen_name: Option<String>

Option fields S-W

The short name of the page

§sex: Option<u64>

Possible values:

  • 1 if female
  • 2 if male
  • 0 unknown
§site: Option<String>

The address of the site indicated in the profile

§status: Option<String>

Status of user. The line containing the status text located in the profile under the name is returned. If the option “Translate to status playing music” is enabled, an additional field is returned status_audio containing information about the composition

§trending: Option<u64>

Information about whether the user’s page has a “light”

§tv: Option<String>

Favorite TV show.

§verified: Option<u64>

It’s coming back

  • 1 if the user page is verified
  • 0 if not
§wall_default: Option<String>

The default wall mode Possible values:

  • owner
  • all

Trait Implementations§

Source§

impl Debug for User

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for User

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more

Auto Trait Implementations§

§

impl Freeze for User

§

impl RefUnwindSafe for User

§

impl Send for User

§

impl Sync for User

§

impl Unpin for User

§

impl UnwindSafe for User

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,