Struct libqaul::node::user_accounts::UserAccounts
source · [−]pub struct UserAccounts {
pub users: Vec<UserAccount>,
}
Fields
users: Vec<UserAccount>
Implementations
sourceimpl UserAccounts
impl UserAccounts
pub fn init()
sourcepub fn create(name: String) -> UserAccount
pub fn create(name: String) -> UserAccount
create a new user account with user name
sourcepub fn get_by_id(account_id: PeerId) -> Option<UserAccount>
pub fn get_by_id(account_id: PeerId) -> Option<UserAccount>
get user account by id
sourcepub fn get_default_user() -> Option<UserAccount>
pub fn get_default_user() -> Option<UserAccount>
Return the default user. The first registered user account is returned.
sourcepub fn get_user_info() -> Vec<User>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
pub fn get_user_info() -> Vec<User>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
A: Allocator,
to fill the routing table get all users
sourcepub fn is_account(user_id: PeerId) -> bool
pub fn is_account(user_id: PeerId) -> bool
checks if user account exists
returns true if a user account with the given ID exists
Auto Trait Implementations
impl RefUnwindSafe for UserAccounts
impl Send for UserAccounts
impl Sync for UserAccounts
impl Unpin for UserAccounts
impl UnwindSafe for UserAccounts
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more