[][src]Struct mediawiki::user::User

pub struct User { /* fields omitted */ }

User contains the login data for the ApiSync

Implementations

impl User[src]

pub fn new() -> User[src]

Returns a new, blank, not-logged-in user

pub fn logged_in(&self) -> bool[src]

Checks if the user is logged in

pub fn has_user_info(&self) -> bool[src]

Checks if user info has been loaded

pub fn has_right(&self, right: &str) -> bool[src]

Checks is the user has a spefic right (e.g. "bot", "autocinfirmed")

pub fn is_bot(&self) -> bool[src]

Checks if the user has a bot flag

pub fn is_autoconfirmed(&self) -> bool[src]

Checks if the user is autoconfirmed

pub fn can_edit(&self) -> bool[src]

Checks if the user is allowed to edit

pub fn can_create_page(&self) -> bool[src]

Checks if the user is allowed to create a page

pub fn can_upload(&self) -> bool[src]

Checks if the user is allowed to upload a file

pub fn can_move(&self) -> bool[src]

Checks if the user is allowed to move (rename) a page

pub fn can_patrol(&self) -> bool[src]

Checks if the user is allowed to patrol edits

pub fn set_user_info(&mut self, user_info: Option<Value>)[src]

Sets the user_info

pub fn user_name(&self) -> &str[src]

Returns the user name ("" if not logged in)

pub fn user_id(&self) -> u64[src]

Returns the user id (0 if not logged in)

pub fn set_from_login(&mut self, login: &Value) -> Result<(), &str>[src]

Tries to set user information from the ApiSync call

Trait Implementations

impl Clone for User[src]

impl Debug for User[src]

impl Default for User[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.