Users

Struct Users 

Source
pub struct Users { /* private fields */ }

Implementations§

Source§

impl Users

Source

pub fn new(client: &Client) -> Self

Source

pub fn list( &self, search: Option<&str>, limit: Option<i64>, offset: Option<i64>, cursor: Option<&str>, cursor_direction: Option<&str>, order_type: Option<&str>, ) -> Result<UserList, AppwriteException>

Get a list of all the project’s users. You can use the query params to filter your results.

Source

pub fn create( &self, user_id: &str, email: &str, password: &str, name: Option<&str>, ) -> Result<User, AppwriteException>

Create a new user.

Source

pub fn get_usage( &self, range: Option<&str>, provider: Option<&str>, ) -> Result<UsageUsers, AppwriteException>

Source

pub fn get(&self, user_id: &str) -> Result<User, AppwriteException>

Get a user by its unique ID.

Source

pub fn delete(&self, user_id: &str) -> Result<Value, AppwriteException>

Delete a user by its unique ID.

Source

pub fn update_email( &self, user_id: &str, email: &str, ) -> Result<User, AppwriteException>

Update the user email by its unique ID.

Source

pub fn get_logs( &self, user_id: &str, limit: Option<i64>, offset: Option<i64>, ) -> Result<LogList, AppwriteException>

Get the user activity logs list by its unique ID.

Source

pub fn update_name( &self, user_id: &str, name: &str, ) -> Result<User, AppwriteException>

Update the user name by its unique ID.

Source

pub fn update_password( &self, user_id: &str, password: &str, ) -> Result<User, AppwriteException>

Update the user password by its unique ID.

Source

pub fn get_prefs(&self, user_id: &str) -> Result<Preferences, AppwriteException>

Get the user preferences by its unique ID.

Source

pub fn update_prefs( &self, user_id: &str, prefs: Option<HashMap<String, ParamType>>, ) -> Result<Preferences, AppwriteException>

Update the user preferences by its unique ID. The object you pass is stored as is, and replaces any previous value. The maximum allowed prefs size is 64kB and throws error if exceeded.

Source

pub fn get_sessions( &self, user_id: &str, ) -> Result<SessionList, AppwriteException>

Get the user sessions list by its unique ID.

Source

pub fn delete_sessions(&self, user_id: &str) -> Result<Value, AppwriteException>

Delete all user’s sessions by using the user’s unique ID.

Source

pub fn delete_session( &self, user_id: &str, session_id: &str, ) -> Result<Value, AppwriteException>

Delete a user sessions by its unique ID.

Source

pub fn update_status( &self, user_id: &str, status: bool, ) -> Result<User, AppwriteException>

Update the user status by its unique ID.

Source

pub fn update_verification( &self, user_id: &str, email_verification: bool, ) -> Result<User, AppwriteException>

Update the user email verification status by its unique ID.

Trait Implementations§

Source§

impl Clone for Users

Source§

fn clone(&self) -> Users

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more

Auto Trait Implementations§

§

impl Freeze for Users

§

impl !RefUnwindSafe for Users

§

impl Send for Users

§

impl Sync for Users

§

impl Unpin for Users

§

impl !UnwindSafe for Users

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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> ErasedDestructor for T
where T: 'static,