pub struct Closed { /* private fields */ }Expand description
A library that was closed, with its replica’s keys still unlocked, and its secrets if they were.
Implementations§
Source§impl Closed
impl Closed
Sourcepub fn open(&self) -> Result<Library, NodeError>
pub fn open(&self) -> Result<Library, NodeError>
Opens the library again, as it is on the disk now. If its secrets were unlocked when
it closed, it keeps their key, and Library::unlock_kept_secrets opens them when an
operation needs them.
§Errors
Returns the errors of Library::open; an error of the keys if the key file’s
protection was changed since.
Sourcepub fn secrets_kept(&self) -> bool
pub fn secrets_kept(&self) -> bool
Whether it keeps the key of the secrets, which were unlocked when it closed: another program may have protected them anew since, which only unlocking them tells.
Sourcepub fn lock_secrets(&mut self)
pub fn lock_secrets(&mut self)
Locks the secrets: forgets their key.
Sourcepub fn without_secrets(&self) -> Self
pub fn without_secrets(&self) -> Self
The library, closed, with its replica’s keys but never its secrets’, for a part of the program that never needs them, such as the holder of the sync role.
Sourcepub fn library_directory(&self) -> Option<&Path>
pub fn library_directory(&self) -> Option<&Path>
The library’s directory, as Library::open takes it.