struct Memory {Show 47 fields
computer: String,
clock: u64,
round: u32,
seq: u64,
own_size: u64,
round_base: u64,
full_round: u32,
grown: u64,
continues: u64,
owed: bool,
owed_waited: i64,
owed_last: i64,
turns: bool,
seal_seen: bool,
seal_salt: String,
ahead_at: i64,
drafts: BTreeMap<String, BTreeSet<String>>,
checked: i64,
tidied: i64,
cleaned: i64,
joined: bool,
read: BTreeMap<String, (u32, u64)>,
read_n: BTreeMap<String, (u32, u64)>,
met: BTreeMap<String, (u32, u64)>,
waiting_for: BTreeMap<String, Awaited>,
broken: BTreeMap<String, i64>,
rebuild: BTreeSet<String>,
pending: BTreeMap<String, (Option<String>, u64, String)>,
entries: BTreeMap<String, Known>,
places: BTreeMap<String, String>,
emptied: BTreeMap<String, i64>,
files: BTreeMap<String, Stat>,
traffic: BTreeMap<String, (i64, i64)>,
format: u32,
switch: bool,
floors: BTreeMap<String, Floor>,
waiting: BTreeMap<String, (Option<String>, u64, String, u32)>,
newer: BTreeMap<String, Newer>,
released: BTreeMap<String, u64>,
held: BTreeMap<String, (u64, String)>,
heard_at: BTreeMap<String, i64>,
forgotten: BTreeMap<String, i64>,
seen: BTreeMap<String, Entry>,
unclocked: BTreeMap<String, i64>,
lists: BTreeMap<String, WholeList>,
sealed: Sealed,
saved: Vec<u8>,
}Expand description
What this computer remembers between two exchanges (memory.json);
what it remembers of files sealed apart aside (files.json, Sealed): a
big notes folder makes that long, and what the doses and claims ask
(heard, written, traffic) reads the rest alone.
Fields§
§computer: String§clock: u64The last clock given or read.
round: u32This computer’s round (its file) and the records in it.
seq: u64§own_size: u64The size of this computer’s file after its last writing: shorter, a sync
app put back an older copy of it, and a new one starts (exchange).
round_base: u64The size of this computer’s file when its round began: a new round once
it grew ROUND_SIZE past it (a round opening on more than that does not
start another one each minute).
full_round: u32The last round that opens on every entry this computer holds (a full
round, new_round); the rounds after it continue it, SEGMENT each at
most. 0: kept by an older Sioul, whose every round was full.
grown: u64What this computer appended since its last full round (bytes).
continues: u64The number of the last line of the round before, when this round
continues it (SEGMENT): said on its first line (Turn::p). 0 for a
full round.
owed: boolA full round is owed: the last round after lost lines of this
computer’s (its file cut short) could not restate all it holds (a file
not readable then), and a reader that had not read those lines waits
for a full round; or another device asks for one (Seen::full).
Written as soon as all reads again (new_round).
owed_waited: i64How long the full round owed waited for a connection not metered,
exchanges running (milliseconds, as Awaited::waited), and the last
exchange that counted it: past OWED_METERED, it goes all the same.
owed_last: i64§turns: boolThis memory enters a round only once the one before was read to its
end (Turn). One kept before (10 October 2026) may have moved past
the end of a round not read whole: every other computer’s kept rounds
are read again once, what was known already changing nothing.
seal_seen: boolThe folder’s seal was seen here, opening with this device’s key: gone
from it later, nothing is written there until it is back (sealed_for).
seal_salt: StringThe salt of that seal: which sharing this memory is of. Another one met (another folder set up with this memory kept): started anew.
ahead_at: i64When this device last found its own records in the folder ahead of
its memory (milliseconds): again soon after, another device writes
under its name (share-twin).
drafts: BTreeMap<String, BTreeSet<String>>Every version of each draft met here, by its key: made here, received,
or passed over (DRAFTS, sent_meanwhile). Forgotten with the draft’s entry.
checked: i64When this computer’s sealed files were last looked for, and the history and leftovers last tidied (milliseconds).
tidied: i64§cleaned: i64When what a crash left half written among the folder’s sealed files
was last cleaned (milliseconds): once a day, since listing blobs/
reads thousands of names (on a phone, through its storage’s slow layer).
joined: boolOthers’ records already read in: done once, when sharing starts.
read: BTreeMap<String, (u32, u64)>How far each other computer’s records were read: its round and the bytes read in it.
read_n: BTreeMap<String, (u32, u64)>The last record read from each other computer: its round and number.
Its claims say how far it wrote (lease::Claim::wrote): read that far,
everything it said until then is known here (docs/health.md, “Knowing”).
met: BTreeMap<String, (u32, u64)>The last line of each other computer met here, read or found damaged
(its number then inferred: the one after the line met before): its
round and number. A round continuing the one before is entered once
that one was met to its last line (Turn), whatever was lost in it,
which read_n keeps said for the doses. Missing (a memory kept before
10 October 2026): as read_n.
waiting_for: BTreeMap<String, Awaited>Each other computer’s round waiting here for the end of the one
before (Turn), and how long it waited, exchanges running: passed
over as lost past AWAITED. (awaited, which counted the clock’s
time, is left aside.)
broken: BTreeMap<String, i64>When a line of another computer’s could not be read here (Unix seconds): what it said is lost.
rebuild: BTreeSet<String>Files whose entries are read again from every computer’s records, this
one’s too, at the next exchange (rebuild): a record lost here comes back.
pending: BTreeMap<String, (Option<String>, u64, String)>Others’ changes not written yet (their file could not be read, or is one this version does not know): tried again at each exchange.
entries: BTreeMap<String, Known>Each entry’s last change: its clock, the computer that made it, its value’s hash (“” once taken out).
places: BTreeMap<String, String>Where each store was read (its path): a store new here, or moved (another
notes folder), joins as a new computer would (exchange).
emptied: BTreeMap<String, i64>Files found empty or gone after holding entries, since when (milliseconds):
their entries count as taken out only once that has lasted (EMPTIED_WAIT).
files: BTreeMap<String, Stat>The files as last read.
traffic: BTreeMap<String, (i64, i64)>When each part last sent a change, and last received one here (Unix seconds).
format: u32The format this device writes (FORMAT): 0 (an older Sioul’s memory)
or 1 until every device in the sharing reads format 2 (format_open),
then 2, once and for all (switch_format).
switch: boolA record in format 2 met while this device still wrote format 1: another device writes it already; this one does from its next exchange.
floors: BTreeMap<String, Floor>Each format-1 entry format 2 renamed: what format 1 last said under it
here, by a hash of its name (Floor, floor_key): read again, format
1 at or below it is passed over (translate).
waiting: BTreeMap<String, (Option<String>, u64, String, u32)>Others’ changes in a format this device does not write yet (format 2, before its switch) or does not know (a newer Sioul’s): their value, clock, computer and format, written once it can.
newer: BTreeMap<String, Newer>Parts met in a format newer than this Sioul knows (Newer). Nothing of
them is sent from here, nor written here, until this Sioul is updated,
or their writers no longer count (release_newer) (share-newer).
released: BTreeMap<String, u64>Parts no longer held for writers that no longer count: their records in that newer format up to this clock, read again, are passed over.
held: BTreeMap<String, (u64, String)>Changes found here while their part was held (newer): when they were
found (a clock) and what they held (a hash; “” taken out). Once the part
is no longer held they go out at that time, not later: a newer
device’s later change still wins over them.
heard_at: BTreeMap<String, i64>When each other device was last heard of here, from its records read
(milliseconds, its clock): what tells a device still there from one
gone, with its sealed entry, never its plain notes (present).
forgotten: BTreeMap<String, i64>Devices you said are gone (forget_device): when they were last heard
of then (milliseconds). They count again once heard of later.
seen: BTreeMap<String, Entry>Each other device’s latest sealed entry seen here (note_entries): an
older copy put back in the folder never lowers what is known of it.
unclocked: BTreeMap<String, i64>The devices known here by records read before (read_n) of which no
clock is known at all (their rounds gone from the folder, read by a
memory from before heard_at was kept, none of their changes the last
word here), with when this device first found them so (milliseconds,
its clock): what ages them (present), so that one gone for good
stops counting 180 days later.
lists: BTreeMap<String, WholeList>What the whole lists of format 1 seen here held (lists format 2
divides), by format 2’s names: each list record read, at its clock, in
whatever order (note_whole_record), and, while this device writes
format 1, the file between exchanges (note_whole_lists); what a later
list took out is passed over at or below that clock (below_whole_floor)
and kept with the list’s floor at the switch (Floor::removed).
sealed: SealedWhat it remembers of files sealed apart, in files.json beside.
saved: Vec<u8>memory.json as save last wrote it, kept with the memory in this
process (Memory::keep); never written itself.
Implementations§
Source§impl Memory
impl Memory
Sourcefn load(path: &Path, computer: &str) -> Memory
fn load(path: &Path, computer: &str) -> Memory
memory.json alone: what the doses and claims ask.
Sourcefn load_all(path: &Path, computer: &str) -> Memory
fn load_all(path: &Path, computer: &str) -> Memory
The whole memory, files sealed apart too (files.json), their entries
and changes among the others while an exchange runs: as the last
exchange in this process left it while both files are as it wrote
them (Kept), else read from them.
Sourcefn save(&mut self, path: &Path) -> Result<(), String>
fn save(&mut self, path: &Path) -> Result<(), String>
Both files written, each when it changed only (a phone’s storage
wears), its bytes on the disk before its name changes. The calls’
entries go beside the notes’: a log of lines names each entry by its
line, and memory.json, written at every exchange and read by the
doses’ knowing, stays small.
Sourcefn keep(self, path: &Path)
fn keep(self, path: &Path)
Kept in this process once saved, for the next exchange or send to take
rather than read both files again (Kept).
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Memory
impl<'de> Deserialize<'de> for Memory
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>,
Auto Trait Implementations§
impl Freeze for Memory
impl RefUnwindSafe for Memory
impl Send for Memory
impl Sync for Memory
impl Unpin for Memory
impl UnsafeUnpin for Memory
impl UnwindSafe for Memory
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
§impl<T> Conv for T
impl<T> Conv for T
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
§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> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§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> Pointable for T
impl<T> Pointable for T
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.