[−][src]Struct mediawiki::user::User
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
Auto Trait Implementations
impl RefUnwindSafe for User
[src]
impl Send for User
[src]
impl Sync for User
[src]
impl Unpin for User
[src]
impl UnwindSafe for User
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,