pub struct App {Show 52 fields
pub screen: AppScreen,
pub active_panel: Panel,
pub view_mode: ViewMode,
pub chats: Vec<Chat>,
pub selected_chat: usize,
pub messages: Vec<Message>,
pub input: String,
pub input_cursor: usize,
pub current_user: Option<User>,
pub status_message: String,
pub scroll_offset: usize,
pub last_refresh: Instant,
pub refresh_interval: Duration,
pub new_chat_mode: bool,
pub new_chat_input: String,
pub new_chat_cursor: usize,
pub suggestions: Vec<UserSuggestion>,
pub selected_suggestion: usize,
pub last_search_query: String,
pub dialog: DialogMode,
pub selected_message: Option<usize>,
pub selected_channel_message: Option<usize>,
pub selected_reaction: usize,
pub my_presence: String,
pub presence_map: HashMap<String, String>,
pub selected_presence: usize,
pub teams: Vec<Team>,
pub selected_team: usize,
pub channels: Vec<Channel>,
pub selected_channel: usize,
pub channel_messages: Vec<Message>,
pub channel_input: String,
pub channel_input_cursor: usize,
pub channel_scroll_offset: usize,
pub teams_panel: TeamsPanel,
pub channels_cache: HashMap<String, Vec<Channel>>,
pub channel_message_cache: HashMap<String, Vec<Message>>,
pub channel_members: Vec<ChannelMember>,
pub show_members: bool,
pub channel_permission_denied: bool,
pub total_unread: i32,
pub known_message_ids: HashSet<String>,
pub reply_to_message_id: Option<String>,
pub reply_to_preview: String,
pub editing_message_id: Option<String>,
pub messages_next_link: Option<String>,
pub channel_messages_next_link: Option<String>,
pub loading_more_messages: bool,
pub selected_setting: usize,
pub editing_setting: bool,
pub setting_input: String,
pub setting_input_cursor: usize,
}Fields§
§screen: AppScreen§active_panel: Panel§view_mode: ViewMode§chats: Vec<Chat>§selected_chat: usize§messages: Vec<Message>§input: String§input_cursor: usize§current_user: Option<User>§status_message: String§scroll_offset: usize§last_refresh: Instant§refresh_interval: Duration§new_chat_mode: bool§new_chat_input: String§new_chat_cursor: usize§suggestions: Vec<UserSuggestion>§selected_suggestion: usize§last_search_query: String§dialog: DialogMode§selected_message: Option<usize>§selected_channel_message: Option<usize>§selected_reaction: usize§my_presence: String§presence_map: HashMap<String, String>§selected_presence: usize§teams: Vec<Team>§selected_team: usize§channels: Vec<Channel>§selected_channel: usize§channel_messages: Vec<Message>§channel_input: String§channel_input_cursor: usize§channel_scroll_offset: usize§teams_panel: TeamsPanel§channels_cache: HashMap<String, Vec<Channel>>§channel_message_cache: HashMap<String, Vec<Message>>§channel_members: Vec<ChannelMember>§show_members: bool§channel_permission_denied: bool§total_unread: i32§known_message_ids: HashSet<String>§reply_to_message_id: Option<String>§reply_to_preview: String§editing_message_id: Option<String>§messages_next_link: Option<String>§channel_messages_next_link: Option<String>§loading_more_messages: bool§selected_setting: usize§editing_setting: bool§setting_input: String§setting_input_cursor: usizeImplementations§
Source§impl App
impl App
pub fn new() -> Self
pub fn current_user_id(&self) -> &str
pub fn selected_chat_id(&self) -> Option<&str>
pub fn selected_chat_name(&self) -> String
pub fn select_next_chat(&mut self)
pub fn select_prev_chat(&mut self)
pub fn next_panel(&mut self)
pub fn prev_panel(&mut self)
pub fn insert_char(&mut self, c: char)
pub fn delete_char(&mut self)
pub fn take_input(&mut self) -> String
pub fn move_cursor_left(&mut self)
pub fn move_cursor_right(&mut self)
pub fn scroll_messages_up(&mut self)
pub fn scroll_messages_down(&mut self)
pub fn should_refresh(&self) -> bool
pub fn mark_refreshed(&mut self)
pub fn enter_new_chat_mode(&mut self)
pub fn exit_new_chat_mode(&mut self)
pub fn new_chat_insert_char(&mut self, c: char)
pub fn new_chat_delete_char(&mut self)
pub fn take_new_chat_input(&mut self) -> String
pub fn select_suggestion(&mut self) -> Option<String>
pub fn suggestion_up(&mut self)
pub fn suggestion_down(&mut self)
Sourcepub fn should_search(&self) -> bool
pub fn should_search(&self) -> bool
Returns true if search should be triggered (input changed and >= 2 chars)
pub fn select_message_up(&mut self)
pub fn select_message_down(&mut self)
pub fn selected_message_id(&self) -> Option<&str>
pub fn select_channel_message_up(&mut self)
pub fn select_channel_message_down(&mut self)
pub fn selected_channel_message_id(&self) -> Option<&str>
pub fn open_reaction_picker(&mut self)
pub fn close_dialog(&mut self)
pub fn show_error(&mut self, title: &str, message: &str, details: &str)
pub fn open_presence_picker(&mut self)
pub fn open_settings(&mut self)
pub fn switch_to_chats(&mut self)
pub fn switch_to_teams(&mut self)
pub fn select_next_team(&mut self)
pub fn select_prev_team(&mut self)
pub fn selected_team_id(&self) -> Option<&str>
pub fn selected_team_name(&self) -> String
pub fn select_next_channel(&mut self)
pub fn select_prev_channel(&mut self)
pub fn selected_channel_id(&self) -> Option<&str>
pub fn selected_channel_name(&self) -> String
pub fn next_teams_panel(&mut self)
pub fn prev_teams_panel(&mut self)
pub fn channel_insert_char(&mut self, c: char)
pub fn channel_delete_char(&mut self)
pub fn take_channel_input(&mut self) -> String
pub fn channel_move_cursor_left(&mut self)
pub fn channel_move_cursor_right(&mut self)
pub fn channel_scroll_up(&mut self)
pub fn channel_scroll_down(&mut self)
pub fn update_total_unread(&mut self)
Sourcepub fn detect_new_messages(&mut self) -> bool
pub fn detect_new_messages(&mut self) -> bool
Detect new messages and return true if there are new ones (for notification bell)
pub fn toggle_members(&mut self)
pub fn start_reply(&mut self)
pub fn start_channel_reply(&mut self)
pub fn cancel_reply(&mut self)
pub fn is_replying(&self) -> bool
pub fn start_edit(&mut self)
pub fn start_channel_edit(&mut self)
pub fn cancel_edit(&mut self)
pub fn is_editing(&self) -> bool
Sourcepub fn is_own_selected_message(&self) -> bool
pub fn is_own_selected_message(&self) -> bool
Returns true if the currently selected message was sent by the current user
pub fn is_own_selected_channel_message(&self) -> bool
pub fn prepend_older_messages(&mut self, older: Vec<Message>)
pub fn prepend_older_channel_messages(&mut self, older: Vec<Message>)
Sourcepub fn show_cached_channels_for_selected_team(&mut self)
pub fn show_cached_channels_for_selected_team(&mut self)
Show cached channels for the currently selected team (instant, no API call)
Sourcepub fn show_cached_messages_for_selected_channel(&mut self)
pub fn show_cached_messages_for_selected_channel(&mut self)
Show cached messages for the currently selected channel (instant)
Auto Trait Implementations§
impl Freeze for App
impl RefUnwindSafe for App
impl Send for App
impl Sync for App
impl Unpin for App
impl UnsafeUnpin for App
impl UnwindSafe for App
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more