pub struct User { /* private fields */ }
Expand description
User
contains the login data for the ApiSync
Implementations§
Source§impl User
impl User
Sourcepub fn has_user_info(&self) -> bool
pub fn has_user_info(&self) -> bool
Checks if user info has been loaded
Sourcepub fn has_right(&self, right: &str) -> bool
pub fn has_right(&self, right: &str) -> bool
Checks is the user has a specific right (e.g. “bot”, “autoconfirmed”)
Sourcepub fn is_autoconfirmed(&self) -> bool
pub fn is_autoconfirmed(&self) -> bool
Checks if the user is autoconfirmed
Sourcepub fn can_create_page(&self) -> bool
pub fn can_create_page(&self) -> bool
Checks if the user is allowed to create a page
Sourcepub fn can_upload(&self) -> bool
pub fn can_upload(&self) -> bool
Checks if the user is allowed to upload a file
Sourcepub fn can_patrol(&self) -> bool
pub fn can_patrol(&self) -> bool
Checks if the user is allowed to patrol edits
Sourcepub fn set_user_info(&mut self, user_info: Option<Value>)
pub fn set_user_info(&mut self, user_info: Option<Value>)
Sets the user_info
Sourcepub fn set_from_login(&mut self, login: &Value) -> Result<(), MediaWikiError>
pub fn set_from_login(&mut self, login: &Value) -> Result<(), MediaWikiError>
Tries to set user information from the ApiSync
call
Trait Implementations§
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> 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