pub struct Lingering { /* private fields */ }Expand description
A closed session the target application has not finished with, still watched.
Nothing here writes back, and that is concept 6.3 rather than an omission. The session is closed; a save arriving now is one this tool was not watching for when the user said they were done, and it cannot tell a complete save from a half-written one. So the watch is used to know when the application has stopped, which is the moment at which asking is worth anything, and the answer comes from the person.
Implementations§
Source§impl Lingering
impl Lingering
Sourcepub fn has_settled(&mut self, quiet: Duration) -> bool
pub fn has_settled(&mut self, quiet: Duration) -> bool
Whether the application appears to have finished: nothing of its own
left in the content directory (concept 6.1), and nothing written there
for quiet.
Both halves, because either alone is wrong. Siblings gone is the signal concept 6.1 settles on, and it says the application cleaned up; it says nothing about a save still being flushed. A quiet period alone would fire in the middle of somebody’s afternoon, between two edits.
Takes &mut self because asking is also draining: a change seen here is
what resets the quiet period.
Sourcepub fn into_session(self) -> Session
pub fn into_session(self) -> Session
Give up the watch and hand back the session, for the caller that is about to act on it.