[−][src]Struct etebase::Account
Represents a user account and is the main object for all user interactions and data manipulation
Fields
user: LoginResponseUser
Implementations
impl Account
[src]
pub fn is_etebase_server(client: &Client) -> Result<bool>
[src]
Check whether the Client is pointing to a valid Etebase server
Arguments:
client
- the already setup Client object
pub fn signup(client: Client, user: &User, password: &str) -> Result<Self>
[src]
Signup a new user account and return a handle to it
Arguments:
pub fn signup_key(client: Client, user: &User, main_key: &[u8]) -> Result<Self>
[src]
Signup a new user account with a key and return a handle to it
Unlike Self::signup, this uses a strong key instead of a password
Arguments:
pub fn login(client: Client, username: &str, password: &str) -> Result<Self>
[src]
Login a user and return a handle to an Account object
Arguments:
username
- the user's username. This is not the same as the user's email.client
- the already setup Client objectpassword
- the user's password
pub fn login_key(
client: Client,
username: &str,
main_key: &[u8]
) -> Result<Self>
[src]
client: Client,
username: &str,
main_key: &[u8]
) -> Result<Self>
Login a user with a key and return a handle to an Account object
Unlike Self::login, this uses a strong key instead of a password
Arguments:
username
- the user's username. This is not the same as the user's email.client
- the already setup Client objectmain_key
- the key to signup with
pub fn fetch_token(&mut self) -> Result<()>
[src]
Fetch a new auth token for the account and update the Account object with it
pub fn force_server_url(&mut self, api_base: &str) -> Result<()>
[src]
pub fn change_password(&mut self, password: &str) -> Result<()>
[src]
pub fn fetch_dashboard_url(&self) -> Result<String>
[src]
Fetch the link to the user dashboard of the account
pub fn logout(&self) -> Result<()>
[src]
Logout the user from the current session and invalidate the authentication token
pub fn save(&self, encryption_key: Option<&[u8]>) -> Result<String>
[src]
Save the account object to a string for restoring it later using Self::restore
Arguments:
encryption_key
- used to encrypt the returned account string to enhance security
pub fn restore(
mut client: Client,
account_data_stored: &str,
encryption_key: Option<&[u8]>
) -> Result<Self>
[src]
mut client: Client,
account_data_stored: &str,
encryption_key: Option<&[u8]>
) -> Result<Self>
Restore and return the Account object from the string obtained using Self::save
Arguments:
client
- the already setup Client objectaccount_data_stored
- the stored account stringencryption_key
- the same encryption key passed to Self::save while saving the account
pub fn collection_manager(&self) -> Result<CollectionManager>
[src]
Return a CollectionManager for creating, fetching and uploading collections
pub fn invitation_manager(&self) -> Result<CollectionInvitationManager>
[src]
Return a CollectionInvitationManager for managing collection invitations
Auto Trait Implementations
impl !RefUnwindSafe for Account
[src]
impl Send for Account
[src]
impl Sync for Account
[src]
impl Unpin for Account
[src]
impl !UnwindSafe for Account
[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, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,