pub struct Model {Show 25 fields
pub lang: Lang,
pub theme: Theme,
pub profile: String,
pub url: String,
pub tab: Tab,
pub size: (u16, u16),
pub now: u64,
pub wall_ms: i64,
pub paused: bool,
pub focused: bool,
pub quit: bool,
pub modal: Option<Modal>,
pub notice: Option<Notice>,
pub busy: Option<ApiCall>,
pub me: Feed<Me>,
pub status: Feed<ClusterStatus>,
pub status_denied: Option<Fail>,
pub cluster: ClusterScreen,
pub tokens: TokensScreen,
pub topics: TopicsScreen,
pub profiles: ProfilesScreen,
pub awaiting_profile: bool,
pub history: History,
pub next_id: u64,
pub generation: u64,
}Fields§
§lang: Lang§theme: Theme§profile: String§url: String§tab: Tab§size: (u16, u16)§now: u64Milliseconds since the app opened, from the last tick.
wall_ms: i64The wall clock at the last tick (ms since the epoch, UTC).
paused: bool§focused: boolfalse while the terminal does not have the focus.
quit: bool§modal: Option<Modal>§notice: Option<Notice>§busy: Option<ApiCall>An action that is running (its reply has not come).
me: Feed<Me>§status: Feed<ClusterStatus>§status_denied: Option<Fail>GET /cluster/status answered 401/403 for this token: the screen falls back to GET /nodes.
cluster: ClusterScreen§tokens: TokensScreen§topics: TopicsScreen§profiles: ProfilesScreen§awaiting_profile: boolWaiting for the person to choose a profile: nothing is read until then.
history: History§next_id: u64§generation: u64Bumped when the screens are reset; a reply of an older generation is dropped.
Implementations§
Source§impl Model
impl Model
pub fn new(options: Options) -> Model
Sourcepub fn reconnect(&mut self, profile: String, url: String)
pub fn reconnect(&mut self, profile: String, url: String)
Starts over with another profile: what was read from the old server is dropped, and so is any reply still on its way (its generation is old).
pub fn id(&mut self) -> u64
pub fn tx(&self) -> Tx
Sourcepub fn is_admin(&self) -> bool
pub fn is_admin(&self) -> bool
true when this token may read the cluster’s detail and manage the tokens (root, no authentication, or the
admin permission).
Sourcepub fn is_root(&self) -> bool
pub fn is_root(&self) -> bool
true for the root token (or no authentication): stopping the cluster and the admin tokens are its alone.
Sourcepub fn uses_status(&self) -> bool
pub fn uses_status(&self) -> bool
The cluster-wide status is read with this token.
Sourcepub fn is_offline(&self) -> bool
pub fn is_offline(&self) -> bool
Any feed that ended in a connection failure: the server cannot be reached.
Sourcepub fn health(&self) -> (Severity, String)
pub fn health(&self) -> (Severity, String)
The worst condition for the status line: its severity and the word (a condition name, or a state key).
pub fn notify(&mut self, severity: Severity, text: String)
Auto Trait Implementations§
impl Freeze for Model
impl RefUnwindSafe for Model
impl Send for Model
impl Sync for Model
impl Unpin for Model
impl UnsafeUnpin for Model
impl UnwindSafe for Model
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
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> ⓘ
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> ⓘ
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