pub struct InForce {
pub label: String,
pub in_force: String,
pub session: bool,
pub by_default: bool,
pub resolved: String,
}Expand description
The effort in force, in the forms each surface needs (#264).
One struct rather than four parallel strings, because the line under the composer, the
full-screen read-out, /status and the dashboard all answer the same question and had all been
answering it differently — three of them by silence.
Fields§
§label: Stringhigh, or not sent — the read-out’s form, short enough for a line that is already full.
in_force: Stringhigh (this session; config.toml says low) — /reasoning’s and /status’s form.
session: boolWhether /reasoning moved it for this process.
by_default: boolThe level came from the backend’s declared default, not from the file or the session: the
one origin a reader would otherwise have to guess at, because nothing in config.toml says
it.
resolved: StringWhat that level becomes on the route in force, in the provider’s own words. Empty when
nobody could resolve it — a read-out that filled this in from a table would be the second
guess /reasoning exists to prevent.
Implementations§
Source§impl InForce
impl InForce
Sourcepub fn sentence(&self) -> String
pub fn sentence(&self) -> String
The whole thing in one sentence: the level and its origin, then the field it is sent as.
One formatter, because /status, the dashboard’s title and the full-screen interface’s
tooltip all describe one dial — and three copies of that sentence is how a read-out starts
disagreeing with a command about the same session (#264).
Trait Implementations§
impl Eq for InForce
impl StructuralPartialEq for InForce
Auto Trait Implementations§
impl Forget for InForce
impl Freeze for InForce
impl Move for InForce
impl RefUnwindSafe for InForce
impl Send for InForcewhere
RawVecInner: Send,
impl Sync for InForcewhere
RawVecInner: Sync,
impl Unpin for InForce
impl UnsafeUnpin for InForce
impl UnwindSafe for InForcewhere
RawVecInner: UnwindSafe,
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.