pub struct Resident { /* private fields */ }Expand description
The sessions this instance is holding.
Implementations§
Source§impl Resident
impl Resident
Sourcepub fn new(root: impl Into<PathBuf>) -> Self
pub fn new(root: impl Into<PathBuf>) -> Self
An instance holding nothing, keeping its sessions under root.
Sourcepub fn is_idle(&self) -> bool
pub fn is_idle(&self) -> bool
Whether there is anything left to hold, which is concept 8’s exit rule.
Sourcepub fn let_questions_stand(&mut self)
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.
Sourcepub fn mood(&self) -> Mood
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.
Sourcepub fn handle(&mut self, request: Request, outside: &Outside<'_>) -> Response
pub fn handle(&mut self, request: Request, outside: &Outside<'_>) -> Response
Answer one request.
Sourcepub fn turn(&mut self, outside: &Outside<'_>)
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.
Sourcepub fn stand_down(&mut self, outside: &Outside<'_>)
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.