pub struct UserStore { /* private fields */ }
Implementations§
source§impl UserStore
impl UserStore
pub fn new( client: Arc<Client>, http: Arc<dyn HttpClient>, cx: &mut ModelContext<'_, Self> ) -> Self
pub fn invite_info(&self) -> Option<&InviteInfo>
pub fn contacts(&self) -> &[Arc<Contact>]
pub fn has_contact(&self, user: &Arc<User>) -> bool
pub fn incoming_contact_requests(&self) -> &[Arc<User>]
pub fn outgoing_contact_requests(&self) -> &[Arc<User>]
pub fn is_contact_request_pending(&self, user: &User) -> bool
pub fn contact_request_status(&self, user: &User) -> ContactRequestStatus
pub fn request_contact( &mut self, responder_id: u64, cx: &mut ModelContext<'_, Self> ) -> Task<Result<()>>
pub fn remove_contact( &mut self, user_id: u64, cx: &mut ModelContext<'_, Self> ) -> Task<Result<()>>
pub fn respond_to_contact_request( &mut self, requester_id: u64, accept: bool, cx: &mut ModelContext<'_, Self> ) -> Task<Result<()>>
pub fn dismiss_contact_request( &mut self, requester_id: u64, cx: &mut ModelContext<'_, Self> ) -> Task<Result<()>>
pub fn clear_contacts(&mut self) -> impl Future<Output = ()>
pub fn contact_updates_done(&mut self) -> impl Future<Output = ()>
pub fn get_users( &mut self, user_ids: Vec<u64>, cx: &mut ModelContext<'_, Self> ) -> Task<Result<Vec<Arc<User>>>>
pub fn fuzzy_search_users( &mut self, query: String, cx: &mut ModelContext<'_, Self> ) -> Task<Result<Vec<Arc<User>>>>
pub fn get_cached_user(&self, user_id: u64) -> Option<Arc<User>>
pub fn get_user( &mut self, user_id: u64, cx: &mut ModelContext<'_, Self> ) -> Task<Result<Arc<User>>>
pub fn current_user(&self) -> Option<Arc<User>>
pub fn watch_current_user(&self) -> Receiver<Option<Arc<User>>>
pub fn set_participant_indices( &mut self, participant_indices: HashMap<u64, ParticipantIndex>, cx: &mut ModelContext<'_, Self> )
pub fn participant_indices(&self) -> &HashMap<u64, ParticipantIndex>
Trait Implementations§
impl EventEmitter<Event> for UserStore
Auto Trait Implementations§
impl !RefUnwindSafe for UserStore
impl Send for UserStore
impl Sync for UserStore
impl Unpin for UserStore
impl !UnwindSafe for UserStore
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