pub struct Ledger {
pub held: BTreeMap<String, Held>,
pub apps: BTreeMap<String, SeenApp>,
pub conversations: BTreeMap<String, SeenTalk>,
pub sites: BTreeMap<String, SeenSite>,
pub back: Vec<Back>,
pub heard: i64,
pub released: i64,
pub released_by: BTreeMap<String, i64>,
pub applied: BTreeMap<String, i64>,
pub released_through: i64,
pub ahead: BTreeMap<String, i64>,
}Expand description
What Sioul held and saw, on this phone ($XDG_STATE_HOME/sioul/app-notes-seen.toml).
Fields§
§held: BTreeMap<String, Held>Held now, by key_hash.
apps: BTreeMap<String, SeenApp>§conversations: BTreeMap<String, SeenTalk>§sites: BTreeMap<String, SeenSite>§back: Vec<Back>§heard: i64When the listener last heard from Android (Unix seconds): the access works.
released: i64The latest release applied before releases were kept by device (the build of 20 October 2026): every device’s stamps up to it count as applied. Never written again.
released_by: BTreeMap<String, i64>The latest release applied, by the device that asked it
(milliseconds, its stamp: everywhere::Switch::release_stamps): each
device’s stamps applied once, apart, so that one far ahead never
stands in the way of another’s (review of part 3, F3).
applied: BTreeMap<String, i64>The stamp each of those marks was applied for (milliseconds, as it was asked), when it was ahead of this phone’s clock: applied once, though the mark is the phone’s now (check of a23cf0c, C-1).
released_through: i64What the releases let through: what was held at or before then (Unix seconds, this phone’s clock; a stamp ahead of it read as its own now when applied, never releasing what is held after).
ahead: BTreeMap<String, i64>Stamps passed over, more than RELEASE_AHEAD ahead of this phone’s
clock when first met, by device: said once in the log, and never
applied later, when the phone’s clock comes within a day of them
(review of part 3, R-2).
Implementations§
Source§impl Ledger
impl Ledger
Sourcepub fn apply_releases(
&mut self,
stamps: &[(String, i64)],
now: i64,
) -> (bool, Vec<String>)
pub fn apply_releases( &mut self, stamps: &[(String, i64)], now: i64, ) -> (bool, Vec<String>)
The releases asked (stamps, by device, milliseconds, each device’s
clock), applied at now (Unix seconds), each device’s once: whether
one is new, and the devices whose stamp is passed over now, too far
ahead (said once). What was held at or before a stamp’s time, or
before now for a stamp ahead of this phone’s clock, then comes back
(released_before). Never during a pause: the caller waits (F5).
Sourcepub fn released_before(&self, held: &Held) -> bool
pub fn released_before(&self, held: &Held) -> bool
Whether a notification held now was first held at or before the last release applied.
pub fn default_path() -> PathBuf
Sourcepub fn load(path: &Path) -> Ledger
pub fn load(path: &Path) -> Ledger
As kept; empty when missing or unreadable (what was held comes back at its time all the same).
pub fn save(&self, path: &Path) -> Result<(), String>
Sourcepub fn note(
&mut self,
p: &Posted,
kind: &Kind,
who: Option<Who>,
admitted: bool,
area: Option<Area>,
decision: &Decision,
now: i64,
)
pub fn note( &mut self, p: &Posted, kind: &Kind, who: Option<Who>, admitted: bool, area: Option<Area>, decision: &Decision, now: i64, )
A notification decided: the app, its conversation or site seen; held, kept to be worked out again.
Sourcepub fn came_back(&mut self, hash: &str, now: i64)
pub fn came_back(&mut self, hash: &str, now: i64)
A held notification Android brought back and that comes now: no longer held, and said on the Porch with what came back with it.
Sourcepub fn returning(&self, hash: &str, now: i64) -> bool
pub fn returning(&self, hash: &str, now: i64) -> bool
Whether this notification is one Sioul held that Android brings back now (or a little before its time).
Sourcepub fn forget_old(&mut self, now: i64, choices: &Choices)
pub fn forget_old(&mut self, now: i64, choices: &Choices)
The old forgotten: held marks long past their time (the app took the notification away meanwhile), apps, sites and conversations not seen for weeks (unless chosen for), what came back yesterday.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Ledger
impl<'de> Deserialize<'de> for Ledger
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for Ledger
impl StructuralPartialEq for Ledger
Auto Trait Implementations§
impl Freeze for Ledger
impl RefUnwindSafe for Ledger
impl Send for Ledger
impl Sync for Ledger
impl Unpin for Ledger
impl UnsafeUnpin for Ledger
impl UnwindSafe for Ledger
Blanket Implementations§
§impl<T> AnyEq for T
impl<T> AnyEq for T
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Conv for T
impl<T> Conv for T
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<T> FmtForward for T
impl<T> FmtForward for T
§fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
self to use its Binary implementation when Debug-formatted.§fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
self to use its Display implementation when
Debug-formatted.§fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
self to use its LowerExp implementation when
Debug-formatted.§fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
self to use its LowerHex implementation when
Debug-formatted.§fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
self to use its Octal implementation when Debug-formatted.§fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
self to use its Pointer implementation when
Debug-formatted.§fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
self to use its UpperExp implementation when
Debug-formatted.§fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
self to use its UpperHex implementation when
Debug-formatted.§fn fmt_list(self) -> FmtList<Self>where
&'a Self: for<'a> IntoIterator,
fn fmt_list(self) -> FmtList<Self>where
&'a Self: for<'a> IntoIterator,
§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
§fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read more§fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read more§fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
§fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R,
) -> R
fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
§fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
self, then passes self.as_ref() into the pipe function.§fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
self, then passes self.as_mut() into the pipe
function.§fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
self, then passes self.deref() into the pipe function.impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
§impl<T> Tap for T
impl<T> Tap for T
§fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
Borrow<B> of a value. Read more§fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
BorrowMut<B> of a value. Read more§fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
AsRef<R> view of a value. Read more§fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
AsMut<R> view of a value. Read more§fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
Deref::Target of a value. Read more§fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
Deref::Target of a value. Read more§fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
.tap() only in debug builds, and is erased in release builds.§fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
.tap_mut() only in debug builds, and is erased in release
builds.§fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
.tap_borrow() only in debug builds, and is erased in release
builds.§fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
.tap_borrow_mut() only in debug builds, and is erased in release
builds.§fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
.tap_ref() only in debug builds, and is erased in release
builds.§fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
.tap_ref_mut() only in debug builds, and is erased in release
builds.§fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
.tap_deref() only in debug builds, and is erased in release
builds.