pub struct Book {
dir: PathBuf,
asked: HashSet<String>,
retry_at: HashMap<String, u64>,
stored: HashSet<String>,
next_id: u64,
pub stored_total: u64,
}Fields§
§dir: PathBuf§asked: HashSet<String>§retry_at: HashMap<String, u64>Keys whose manifest the node did not know, and when to ask again.
stored: HashSet<String>§next_id: u64§stored_total: u64Implementations§
Source§impl Book
impl Book
pub fn open(data_dir: &Path) -> Result<Book>
Sourcepub fn request_for(&mut self, signing_key: &str, now_ms: u64) -> Option<String>
pub fn request_for(&mut self, signing_key: &str, now_ms: u64) -> Option<String>
A manifest request, if this key has not been asked about yet or it is time to ask again.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Book
impl RefUnwindSafe for Book
impl Send for Book
impl Sync for Book
impl Unpin for Book
impl UnsafeUnpin for Book
impl UnwindSafe for Book
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
Mutably borrows from an owned value. Read more