Skip to main content

Crate nibkeep_node

Crate nibkeep_node 

Source
Expand description

The NibKeep engine: everything an app needs to work with a library, its keys, who it belongs to, and its spaces.

The library’s files are specified in docs/spec/storage.md, and the reasons for the engine’s shape in docs/Technical-design.md.

Re-exports§

pub use backup::BackupDrive;
pub use backup::BackupFolder;
pub use backup::named_at as backup_named_at;
pub use backup::named_in as backup_named_in;
pub use place::Drive;
pub use place::Whereabouts;
pub use place::declare_phone;
pub use place::declare_phone_with_disk;
pub use place::serial_disk_name;

Modules§

at_login
Syncing from login (technical design): nibkeep-sync, a program without a window that starts when the person logs in, holds the sync role of the libraries they chose, as an app holds it while unlocked. Every NibKeep program reads and writes the list of those libraries alike, in the person’s folder of settings; the service follows it, and writes beside it what it does for each.
pointer
The .nib file in the folder of a tree outside its library’s folder, which names the library, as a worktree’s .git file names its repository, so that commands run there find it; and none in the folder of a tree inside it, where the commands find the library without one, and a file left there would take them over. nib and the apps that start trees settle it alike (technical design: trees).

Structs§

AddedBackup
A backup just made.
AddedFile
What adding a file did.
AddedSecretFile
What adding a secret file did.
Answered
A sync that another replica started.
Author
Who made a change, as far as the space knows.
BackedUp
An update of a backup that the holder of the sync role found.
Background
A thread that holds the sync role of a replica in the background, or waits for it, until this is stopped or dropped.
BackgroundOptions
How a program holds the sync role in the background: as Holding says, with what it keeps of its own.
BackgroundState
What the thread that holds the sync role in the background does now.
Backup
One of the person’s backups, as their personal space records it.
BackupDrive
What the drive or share that holds a backup’s folder is, as copies count it.
BackupEdit
What to change of a backup: each value given replaces what it had.
BackupMoved
How many things went one way in an update of a backup.
BackupState
What a backup’s folder says of it, without an update: read from its record.
BackupUpdate
What an update of a backup did.
BlameLine
A line of a file of a tree, with what last changed it.
Borrowed
The network, borrowed from the holder of the sync role to pair, until this goes: the lock on sync.lent, and the role itself if no program held it.
Carried
What a move noted of a value that it carried from another space, as its mover’s account of it, not as proof (technical design: spaces and moves).
Census
What a space holds, counted: Library::census.
ChangeCopies
How the space’s changes are held, as a check counts them against the space’s Critical policy.
CheckRun
What one run of the regular check did.
CheckStatus
Where this replica’s checks stand, for the person.
CheckedFile
How the copies of a file meet the policy chosen for it, as Library::check_policies counts them.
CheckedOut
What checking out a file did.
Checkout
A checkout on this device.
Choice
The policy chosen for a file.
ClaimInSpace
A claim to the admin role in a space, as a program shows it.
CloneFolder
The folder that a clone goes into, made empty, with the folders made for it: what to remove, from the innermost, if the clone fails.
Closed
A library that was closed, with its replica’s keys still unlocked, and its secrets if they were.
Commit
What to commit to a tree.
Committed
What a commit recorded.
CompartmentKey
The key of an unlocked compartment: kept while the compartment stays unlocked, so that changing its keys needs no new passphrase or confirmation. It is wiped when dropped and never printed.
Conditions
The conditions of a rule, which must all hold for it to choose. A rule without any chooses for every file.
Connection
A connection to another replica: one stream of messages each way.
CopiesRemoved
What removing files from a tree’s copy did, as Git’s rm does: the copies deleted, for the next commit to record as deleted.
Counts
How many things of a space went one way.
CutShort
A commit that was cut short.
DamagedCopy
What checks found damaged in a space, for the person.
DatedValue
A value with when it held: Library::dated_values.
Dating
The time of an edit or a view: the day a person sees, and when they write.
Described
An entity and its name.
DeviceMarks
How a person marked a device, in the personal space.
Disk
A disk that holds copies of a space’s files or changes, as this replica holds them now and the other replicas’ accounts say.
DiskBackup
A backup on a disk (technical design: backups).
DiskReplica
A replica on a disk.
Drive
A drive, as the system reports it.
DropRefusals
The reasons a drop is refused.
Dropping
How far a drop of a space on this device has come.
EditsRecorded
What recording the edits of a checkout’s copy did.
Ended
What ending a checkout did.
EntityView
An entity as a person sees it: its name, types, and the values of its fields.
ExportCheck
An export, compared with the library it came from.
Exported
What an export wrote.
FieldHistory
Every value of one field of an entity, in the order they were recorded.
FieldView
A field of an entity, and its values.
FileCopy
A disk that holds a copy of a file, and how.
FileDiff
How one file or link of a tree differs between two points.
FileFrom
Where a file to add came from, beyond the folder it is read from: the source it was imported from, and its path and name there; where it was found, if it is read from a copy that is no original, as one unpacked from an archive; values that replace what it says of itself, as an archive’s metadata; and the folders to put it in.
Folder
A folder on a device, which a rule names.
FoundBackup
Where the holder of the sync role found one of the person’s backups on this computer.
FoundElsewhere
Where a file was found, when the file that is read is a copy of it, as one unpacked from an archive.
GitRepository
What Git says of a repository in a tree’s copy: what nib reads from the person’s Git, and gives a commit to record.
GroupInSpace
A group that a space’s governing changes add, as a program shows it.
GroupJoinRequest
A request, in a group, that the group join a space.
GroupMember
A member of a group, with their role in the group.
HeldElsewhere
A space of the user’s that this device does not hold, with the devices of theirs that do.
History
Every value an entity has had, by field.
HolderRecord
What the holder of the sync role records of itself.
Holding
How the holder of the sync role runs.
Imported
What an import brought in.
InTree
Where a secret file of a tree is: the tree whose commit made it, which it belongs to for good, and its path there (technical design: secrets in trees).
Invitation
What an invitation is to: a shared space, the role it gives, and the person in the space whom it names the new user, which the user agrees to after joining (Library::link_member).
Invited
A member that an invitation added.
Invitee
Who asks to join a space, as the admin’s device shows them before the person confirms: the user, by ID and name, the names of the device and app that ask, the members whose records name the same user ID, and whether the user was a member before.
Joined
A library made by pairing with a sponsor, and its first sync.
JoinedSpace
A space that this library joined by an invitation, and its first sync.
Joining
A new replica that is joining a library: its keys, and the names of its device and app, before the sponsor grants it the space keys.
KnownSpace
A space of the user’s, whether this device holds it or not, as the personal space knows it.
Lacks
What the copies of a file lack of what its policy needs.
LanguageSettings
The ranked languages of the user, this device and this replica, where set.
Library
A library, opened: its replica’s keys unlocked, and its spaces open.
Linking
An entity that links to another.
Links
The entities that link to an entity through one field.
Listed
An entity in a list.
Listing
What Library::list lists: the things of a space, or of a type, that meet every condition, ordered by name or by a field.
MadeSecret
What purging the versions of an ordinary file that a commit made secret takes, and what it leaves.
Member
One item of a list.
MemberReplica
A replica that a shared space lists for a member.
MovePreview
What a move would take, for an app to show before it moves.
Needs
What a policy asks of the copies of a file.
Network
This replica’s endpoint on the network, which connects to others and takes their connections.
NetworkOptions
How an endpoint starts.
NewBackup
What a new backup holds.
NewDevice
What the person chose for a new device of theirs, on the device that shows the code: a computer takes every space of this device’s, and the spaces given to it later; a phone takes the personal space alone, and asks before it takes a space given to it later.
NewLibrary
Who and where a new library starts: the user’s name, and the person’s, the user’s own entity among the people, if it differs; this device’s name, and the name of the app that keeps the replica; and the languages the user reads, ranked.
NewRule
A rule to add.
NewValue
A value of a new entity: in a language, if given, and with other forms, each in its language, if given.
NotACode
Why text is not a pairing code.
OpenedRecovery
What a recovery file gives a code that opens it.
Opening
How long opening a library took.
OtherForm
Another form of a value shown, in another language or script.
Pace
How the holder of the sync role paces its checks.
Paired
A replica that pairing added.
PairingCode
A code that pairs two replicas once: eight decimal digits, the first two from 10 to 99, which find the sponsor on the network, and six more that are secret. It is shown as 37-482-177, and never printed in full by Debug.
Part
Where one kind of copies stands in a round.
PassphraseParams
How much work deriving a key from a passphrase takes: the memory, iterations and lanes of Argon2id.
PastValue
A value an entity had, or has.
PersonLink
A member’s link to a person in a shared space: it holds when an admin’s statement and the member’s own name the same person; an admin’s own statement counts for both while they are an admin (users and people).
Policy
A storage policy of a space.
PolicyCheck
What a policy needs, in policy check order, and the files that do not meet it, with copies counted by disk across devices (technical design: where the copies are).
PolicyCount
How a policy is met for the files it is chosen for.
PolicyEdit
Changes to a policy: each value given replaces what the policy has.
Purge
What a purge takes away: the statements of the values, current or past, and how many changes lose their keys and payloads; the content they refer to, with its sealed copies and this device’s checkouts of it; and the originals of that content that NibKeep knows of, which it leaves where they are.
PurgeRequest
An entity that a move left behind, whose mover asked that the rest of it be purged, as an admin’s replica lists it: where the new entity counts with the same values.
PurgedCheckout
A copy on this device of content that a purge takes away: a checkout’s, or a tree’s file’s.
Question
A file large enough for the rule that would choose its policy to ask whether it can be got again, if it is lost: the answer counts for its folder, as Library::answer takes it.
RecordedRepository
A Git repository that a tree records.
Records
The records of the sync role, in sync.sqlite beside its lock, encrypted under a key of the replica’s: who holds the role, what other programs ask it, and what it did.
Recovered
What a recovery did.
Recovering
A recovery under way, which Library::start_recovery began: the new replica, which nobody knows yet, holds what the backup holds of the personal space, and the keys sealed to the code there. Recovering::holds_secrets says whether the code holds the secrets, so that the person is asked how to protect them only then; Recovering::others lists the person’s other devices, which Recovering::keep keeps some of; and Recovering::finish does the rest. One dropped before it finishes removes the new replica.
RecoveryCheck
What a check of a recovery code on a device that works found.
RecoveryCodeInfo
A recovery code of the person’s, as their personal space names it.
RecoveryFile
The recovery file. In CBOR, the array [1, codes, check]: for each code, sorted by its record, [record, entry, signature], the code’s record in the personal space, the personal space’s entry for it, as the personal space gives a space to a replica, and the code’s signature of what the entry names, which the personal space states on the code’s record (RecoveryEntry); and the BLAKE3 hash of the canonical encoding of codes, so that a file damaged on its drive reads as damaged, and is written again.
RecoveryKeys
The keys of a space that a recovery code opens, of those that this replica holds and that were given out. The first key is never given out: it reaches a code another way.
RemovalPass
A pass of removals, and the syncs that it ran for proofs.
Removals
A pass of removals, as Library::plan_removals plans it: the copies to remove, and what to ask the replicas that are to prove theirs, which a sync with each of Removals::provers puts to them (crate::Syncing::proving).
Removed
What a pass of removals did.
Replica
A replica of the library, as its personal space lists it.
ReplicaCopy
A copy of a replica made elsewhere, in a library’s directory.
ReplicaRecord
What the holder of the sync role records of another replica.
Report
What checking a library found.
Reverted
What undoing a revision wrote into the copy.
Role
The sync role of a replica, held: the lock on its sync.lock, which the system lets go of when the program ends, even by a crash.
Round
Where a round of checks stands, as the sync records keep it.
Rule
A rule of a space, which chooses a policy for the files that it holds for.
Searched
The first entities that a search finds, and how many more there are, as Library::search_first lists them.
SetAside
A change that was set aside: its author was revoked by a replica that did not have it, or nobody listed its key; or, in a space with members, its author’s member left, was removed or lost a role before they knew of it, or their role never allowed it.
Showing
How a code that this device shows waits for the device that types it: for up to timeout from when it is shown, telling wrong_try of each try that fails before it matches.
ShownValue
A value as it is shown.
Source
A source of files, as a space records it.
SpaceHolder
A device of the user’s that holds a space.
SpaceMember
A member of a shared space, as its counting governing changes say: a user, with a role, and the replicas listed for them there.
SpaceReport
What checking a space found.
SpaceRequest
A device of the user’s that asks for a space this device holds, which the person approves here with Library::allow_space.
SpaceStatus
What a space holds.
SpaceSynced
What a space’s sync sent and received.
Sponsor
The library as pairing changes it: what grants a new replica the space keys, and records it once it has joined.
StartPreview
How much a tree would take in if it started in a folder.
StateMark
Where a space’s state stands: Library::state_mark. Two marks of one library are the same only while neither space took in anything between them.
Status
What a library holds, as a person would want to know.
Synced
What a sync did.
SyncedWith
A sync with one of the user’s other replicas.
Syncing
The library as a sync reads and changes it.
TakenIn
What taking in copies brought.
Thumbnail
A thumbnail that a Thumbnailer made: a JPEG, its size in pixels, and the picture hash of what it shows, if the thumbnailer makes one.
ThumbnailCounts
How many of a space’s files are pictures or videos, as their media types say, and how many of those have a thumbnail.
ThumbnailOf
A thumbnail of a content, as a device shows it.
ThumbnailsMade
What making thumbnails did.
Ticks
Where a stored log reads the time that tells the changes of a burst from changes made one by one: the system’s monotonic clock, unless a test sets another, so that the same changes form the same bursts on every machine, however fast.
ToClone
A repository that this device’s copy of a tree does not hold: what a clone would take, and where it comes from, or why it may not be cloned.
Tree
A tree of a space, and where its folder is on this device, if it has a root here.
TreeChange
What a path of a tree’s copy holds that the tree does not, as a commit records it.
TreeEntry
A file or a link of a tree, as the library has it now.
TreeLogEntry
A change to a tree, as its log lists it.
TreeSecrets
The secret files of a tree, and its ordinary files that look secret (technical design: secrets in trees).
TreeStarted
What starting a tree did.
TreeStatus
What a tree’s copy on this device holds that the tree does not, and what the tree holds that the copy does not.
Updated
What updating a tree’s copy did.
Waiting
How pairing with a closed library waits: as showing says, until stop is set; whether it gives the secrets to a new replica that asks for them, and what the new device is, a computer or a phone, and which spaces it gets, as the person chose.
WaitingCopy
A copy that waits before destroying what a purge destroys, as a purge names them before the person confirms: the person’s archive nodes and backups, and other members’.
WaitingOn
A backup that a purge waits on.
WaitingPurge
A purge whose destruction this replica keeps apart while it waits.
Whereabouts
Where a folder is now.
Written
What writing a tree, or part of one, wrote.

Enums§

AskedFor
What a new replica asked for, besides the library, as it paired.
Behind
Whether a move purges what it leaves behind in the old space (technical design: spaces and moves).
Change
What changed at a path of a tree’s copy.
ChosenBy
What chose a file’s policy.
CopyHeld
How a disk holds a copy of a file.
CopyState
Whether a checkout’s copy is as it was written, or as its edits were recorded.
Damaged
A copy that checks found damaged.
DeviceRole
What a device does with the files of its spaces, as its user marked it (technical design).
DropRefusal
Why a drop of a space is refused now.
DropStage
How far a drop has come.
DropWait
What a drop waits for before this device states its choice.
Edit
A change to an entity.
ExportKind
What an export holds.
ExportProblem
What is wrong with an export, compared with the library it came from.
Held
What the holder of the sync role did, for the program to show.
Here
What a device did with a space of the user’s.
Kept
Where devices keep the files of a policy. The store is the stricter.
KeysError
Why keys could not be unlocked or saved.
LanguagesFor
Whose ranked languages: the user’s own, this device’s, for every app on it, or this replica’s, for this app alone. The most specific list counts.
MemberRole
A member’s role in a space with members, lowest first: none for a member who left or was removed.
More
How many more entities a search finds than it lists.
MoveHistory
Whether a move brings the history of what it moves (technical design: spaces and moves).
MoveSecrets
Whether a move takes the secret values of what it moves (technical design: sharing): the values of fields secret in the old space.
NetError
Why networking failed.
NewProtection
How to protect a compartment that is being written.
NodeError
Why the engine could not do something.
Place
Where a rule goes among the rules of a space.
Problem
Something wrong with a space.
Protection
How a compartment’s key is found.
Reason
Why a side ended a connection, as [0, reason] says.
RecoveredFrom
What a recovery took the library from.
RecoveredSecrets
What became of the library’s secrets in a recovery, which takes those that the code holds.
SecretsState
Where a library’s secrets are, as this replica sees them.
SyncError
Why pairing or syncing failed.
Taking
What taking a space did.
TreeEntryKind
What a file or a link of a tree holds.
TreePoint
A point of a tree’s history to read it at.
Unlocker
What unlocks a compartment.

Constants§

CODE_TRIES
How many tries a code takes (Sync): the one in which it matches spends it, and so does the last of those that fail before it matches, whatever made them fail. Two pairings at once whose codes share their first two digits may each reach the other’s device first, and a person may mistype a code.
CONFIRMED_KEYSTORE_SERVICE
The service under which a phone’s keystore holds keys that it releases only after the person confirms, with a fingerprint or the screen lock, each time: the secrets’ keys (technical design).
COUNTS_FOR_MILLIS
How long a copy counts after its last check: 8 weeks, two rounds.
DAY
A day, in milliseconds.
DEFAULT_PORT
The UDP port that replicas take connections on unless told otherwise, so that a firewall can let them through with one rule.
DEFAULT_WAIT_DAYS
How many days an archive node, or a backup, waits unless its owner says otherwise: 30.
ENGINE_VERSION
The engine’s version, which the engines file records of each program, and a copy of nibkeep-sync tells, so that the newest runs.
KEYSTORE_SERVICE
The service under which the platform’s keystore holds the keys of libraries: the same for every app, so that each opens the libraries that the others protect with it.
MOST_PICTURE_BYTES
The most bytes of a picture read to make its thumbnail: larger pictures get none.
MOST_WAIT_DAYS
The longest wait an owner may set, in days: 365.
OWN_RECORDS
The types of NibKeep’s own records of who uses a library, recovery codes among them: an export of current values leaves them out, a merge refuses them, and edits neither give them nor take them away.
POLICY
A file’s own choice of policy: a reference to it.
PORTS
How many ports from the one asked for an endpoint tries, before it takes any: from 53300 to 53309 by default, one for each library of a computer that waits at once.
RECOVERY_FILE
The recovery file’s name, in a replica’s folder and in a backup’s.
REMOVALS_AT_ONCE
How many copies a pass removes at most, so that a device removes a little at a time.
REPLICA_VERSION
The version of a replica’s stored files that this engine reads and writes: those of version 1 of the storage specification.
ROUND_MILLIS
How long a round of checks takes, in which every copy is read once: 4 weeks.
STORAGE_POLICY
The type of storage policies.
STORAGE_RULE
The type of the rules that choose a file’s policy.

Traits§

BackupFolder
A backup’s folder, as the engine reads and writes it: files and folders under it, named by their paths from it, with / between names, such as spaces/<space>/<digest>.pack. On computers, the file system stands behind it; on Android, the folder that the system’s picker gives, which gives files but no paths, never replaces a file in one step, and moves a file only under its own name (technical design: backups).
Thumbnailer
What reads pictures and makes their thumbnails, which a program brings: nib and apps on a computer bring decoders in memory-safe Rust. An app on Android brings none: it makes thumbnails with the phone’s own decoders and hands them over, through Library::record_thumbnails_made. It runs on several threads at once.

Functions§

answer
Waits up to timeout, or for as long as it takes, for another replica to sync, and answers it, on a network that takes connections: the library is opened for the sync and closed after it, so that other programs can use it in between. A replica that connects while another program has the library open is told to try again later. After a sync, the keys of the spaces are settled, as Library::settle_keys says, and then the checkouts, as Library::settle_checkouts says. None if none came in time.
answer_connection
Answers a connection that another replica opened, as answer does once it accepted one: so that a program can wait for connections without holding its library, and answer each with the library it holds then. Without a library, as when it is locked, the other replica is told to try again later.
ask_to_sync
Asks the program that holds the sync role of the replica, whichever it is, to sync with one other replica, or with all it finds, and waits until it did, for at most wait: waits first for a program to take the role, if none holds it, and for one that just took it to look for the others on the network, which it connects to at once in its first while (Holding::APPEAR_WAIT). Returns when it asked, after which the holder recorded each sync of the answer (crate::ReplicaRecord::synced); or None if no program answered in time. now is the wall clock, as the holder’s is.
ask_to_sync_each
Asks as ask_to_sync does, for a sync with each of several replicas, as when a file is fetched from the devices that hold it, and waits until the holder answered them all.
backup_named_at
The backup that a folder names, if it names one, by its record’s ID.
backup_named_in
The backup that a folder reached through the interface of files names, if it names one, by its record’s ID.
backup_wait_days
How many days a backup waits before purging, as marked: its own number of days, or 30 without one.
borrow_network
Borrows the network of a library’s replica, to pair: locks sync.lent, which tells the holder of the sync role to stop its endpoint, and waits until it records that it runs none, or stop is set; or, if no program holds the role, takes it, so that none starts an endpoint meanwhile. The endpoint starts again once the borrowed network goes.
declare_phone
Declares that folder is an app’s own folder on a phone, which no other app reaches, and phone the phone’s ID, which the app keeps where the system never copies it to another phone: the replicas in it are told from copies by the phone’s ID alone, as the folder’s path may change when the app is updated.
declare_phone_with_disk
Declares an app’s own folder on a phone as declare_phone does, with disk, a name of the phone that the apps of one developer share, such as Android’s ID for them: replicas of such apps on one phone are on one disk, and count as one copy.
hold
Holds the sync role of a closed library’s replica, and syncs it, as the technical design’s section on the sync role says, until holding.stop is set: runs its endpoint, on which it answers every replica that connects, each sync on a thread of its own, with a library of its own; and connects to the others, one at a time, as it takes the role, when one appears on the network, a while after new changes came, made here or received, and when another program asks. Each change sets off at most one sync with each other replica: one it synced with since the change came is not synced with again. It runs no endpoint while another program borrows the network. Beside the syncs, on a thread of its own, it checks a share of the replica’s copies whenever one is due, as holding.check paces it, and after a check that found damage syncs with every replica it finds (Library::check_copies). rng makes randomness for each thread. told hears what it does.
holds_words
Whether a text holds every word of query as a search compares them: without regard to case or accents, each a whole word of the text, but the last, which may also start a longer one. A query without words is held by no text.
invite
Invites a user to a shared space, as a replica of an admin of it: announces the code’s first two digits on the network, waits as showing says for a replica to join with the code, shows confirm who asks, and, once it says yes, adds them as a member with the role given, lists the replica that joined, and answers its first sync of the space. network must take connections. The code takes tries as in pair. If the first sync fails, the joiner removes the space while the member stays, and a new invitation of the same device makes it that member again; a device listed already comes back so too. Changes are made at the time now gives when they are made.
invite_closed
Invites a user to a shared space, as invite does, as a replica of an admin of it whose library is closed: it checks the role before the code is shown, waits as showing says, until stop is set, without the library open, so that other programs use it meanwhile, and opens it once a replica connects, closing it again after a try that failed before the code matched.
is_safe_tree_path
Whether a path is one that a tree may hold, and so one that writing a tree may write: relative, with / between its folders, in composed form, at most 4,096 bytes, with no empty name, no . or .., no backslash, which Windows reads as a separator, no zero byte, and no name that any system reads as .git or .nib, the folders of Git and of the library.
join
Makes a library in a directory that holds none by pairing a new replica with the replica that shows code on the network, and syncs with it: it tries each that announces the code’s first two digits in turn, waiting up to timeout to find the first. network is the new replica’s, started with Joining::network. The keys are protected as protection says. If the first sync fails, the library is removed again, as the sponsor deletes the new replica’s records: the pairing failed.
join_space
Joins a shared space by the invitation of the replica that shows code on the network, and syncs the space with it: it tries each that announces the code’s first two digits in turn, waiting up to timeout to find the first. network is this replica’s. If the first sync fails, the space is removed again, and a new invitation makes this replica the same member. The user’s other replicas get the space through the personal space, after their next syncs with this one.
name_program
Names this program, as the engines file of each replica that it opens records it, such as Passwords: once, before it opens a library. A later name, or an empty one, is ignored. A program that names itself nothing is named by its executable’s file name.
pair
Pairs a new replica, as the sponsor: announces the code’s first two digits on the network, waits as showing says for a replica to pair with the code, records it once it says it made its library, and answers its first sync. network must take connections. The code takes CODE_TRIES tries: the one in which it matches spends it, and so does the last of those that fail before it matches; showing is told of the others. If the first sync fails, the new replica’s records are deleted again, as the new replica removes its library: the pairing failed. Changes are made at the time now gives when they are made.
pair_ai_agent
Pairs a new replica of an AI agent named name, as pair pairs one of the user’s: the change that lists its key marks it as an AI agent’s, for good, and it is named after the AI agent (technical design).
pair_ai_agent_in
Pairs a new replica of an AI agent as pair_ai_agent does, and lists it in spaces too, besides the personal one, as the person chose (technical design: sharing): its key signs its listing in each as it joins, and it takes each from the personal space, which gives it their first keys. A shared space must allow AI agents, which an admin’s replica says, if it does not yet, once the AI agent’s replica has joined. The AI agent’s replica gets no other space; it is paired anew to change them.
pair_closed
Pairs a new replica as pair does, with the library closed while it waits for one, so that other programs, and the app itself, can use the library in between: it is opened once a new replica connects to pair, waiting a little for another program to close it, and closed again after a try that failed before the code matched. It stops waiting, as if the time were up, once stop is set, and gives the secrets as pair_giving_secrets does if waiting says so. The caller checks first that this replica may add devices, with Library::check_not_ai_agent, before it shows the code.
pair_device
Pairs a new device of the person’s, as pair does, as they chose: a computer, which gets every space of this device’s, or the spaces chosen, and takes those given to it later; or a phone, which gets the personal space alone, or the spaces chosen, and asks before it takes a space given to it later (technical design). With give_secrets, it gives the new device the secrets, as pair_giving_secrets does.
pair_giving_secrets
Pairs a new replica as pair does, and gives it the secrets, if it asks for them: the person chose to, and they are unlocked.
remove_unkept
Removes, a little at a time, the copies that this replica no longer keeps, once other disks have proven theirs (technical design: the planner): plans a pass (Library::plan_removals) among the replicas whose endpoints were found on the network, syncs with each that is to prove its copies, one after the other, putting the challenges to it, and removes the copies whose proofs came in time (Library::remove_proven), marked in records while they go; then purges the thumbnails that it made twice (Library::purge_thumbnails_made_twice). First, it destroys what purges destroyed whose wait has ended (Library::destroy_due).
remove_view_copies
Removes the copies written for viewers in a program’s folder (Library::view_copy), as a program does when it starts: the folders named as those copies’ are, with the files in them, and nothing else. Returns how many copies it removed.
resolved_path
Where path is, as the file system resolves it, written as people write it: the form in which a space keeps the path where a file was found, and the folder of a rule.
retry_in_use
Calls open, which opens a library, again while another program has the library open, for up to wait: NodeError::in_use says so.
serial_disk_name
What names the disk of a drive known only by its file system’s serial, as Android’s picker gives it, such as 9CB1-1616 for FAT and exFAT: named as a computer names a drive whose serial alone it reads.
sync_with_found
Syncs once with each of peers whose endpoint is among those found on the network, one after the other, as sync_with_others does once it found them: so that a program can look for the others with the library closed, with Library::peers and Network::find. A peer that was not found is in the result as NodeError::NotFound.
sync_with_others
Syncs once with each of the user’s other replicas that it finds on the network within timeout, one after the other. network need not take connections. What is received is checked against the time now gives when it arrives.
taken_of
When a photo was taken, of what it says itself, own, and what where it was found says, given: its own, if it is the same moment, to the second, as given, or the same moment in a time zone of whole quarter hours when it says no offset, which it then gets; else given, as when someone corrected the date where it was found.
tree_path_at
The path in the tree at root of what is at path, a full path, whether or not it is there: its folder as the file system resolves the part of it that is there, and the rest as written, relative to the root; empty for the root itself.
tried
Whether a sync with another replica was tried: those not found are not told of; nor those that refused, as a program there only connects, as one that syncs once connects to this one itself: no sync failed.
wait_days
How many days a device waits before purging, as marked: an archive node its own number of days, or 30 without one; an everyday device none.

Type Aliases§

WrongTry
What a device that shows a code is told of each try that failed before the code matched, but the last, which ends the pairing or the invitation with its error instead: why it failed, and how many tries the code has left.