Skip to main content

Resident

Struct Resident 

Source
pub struct Resident { /* private fields */ }
Expand description

The sessions this instance is holding.

Implementations§

Source§

impl Resident

Source

pub fn new(root: impl Into<PathBuf>) -> Self

An instance holding nothing, keeping its sessions under root.

Source

pub fn is_idle(&self) -> bool

Whether there is anything left to hold, which is concept 8’s exit rule.

Source

pub fn let_questions_stand(&mut self)

Let questions stand for as long as the instance does.

For an instance with a standing surface, which is what [HELD] was standing in for. That limit exists because a question is the only thing keeping the process alive and a process nobody is talking to must not sit there for the afternoon. Where an icon is up, the process is already staying for its own reasons, so the limit buys nothing and costs the question: taking it back and naming two command lines in its place is the dead end that made the tray look necessary in the first place.

Not a setting. It follows from whether there is somewhere for the question to keep being visible, which is a fact about the platform and the invocation rather than a preference.

Source

pub fn troubles(&self) -> &[Trouble]

What the standing list is coloured for.

Source

pub fn mood(&self) -> Mood

What colour the icon is, which is the worst thing currently true.

Two sources, and they are different in kind. A trouble is remembered until somebody puts it down, because it is a moment that would otherwise be gone. A session waiting on a decision is not remembered at all — it is read off the sessions every time, so answering the question is what clears the colour, with nothing to dismiss and nothing that can fall out of step with what is on disk.

Source

pub fn handle(&mut self, request: Request, outside: &Outside<'_>) -> Response

Answer one request.

Source

pub fn turn(&mut self, outside: &Outside<'_>)

One turn: pump the open sessions, move on whatever has settled, and act on whatever has been answered.

Source

pub fn stand_down(&mut self, outside: &Outside<'_>)

Close every open session, and put down every question, for a shutdown that is not a crash.

A question left standing when this process goes is a button with nobody behind it, so each is withdrawn and replaced by the two commands that reach the same decision. The session directories stay: concept 6.3 carries them to the next launch, which is where they were always going to be answered if nobody answered here.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more