Skip to content

Commit

Permalink
Single forget_area fn with protected param
Browse files Browse the repository at this point in the history
  • Loading branch information
sgwilym committed Aug 27, 2024
1 parent 09b7016 commit cc2a67e
Showing 1 changed file with 4 additions and 11 deletions.
15 changes: 4 additions & 11 deletions data-model/src/store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use ufotofu::nb::BulkProducer;

use crate::{
entry::AuthorisedEntry,
grouping::AreaOfInterest,
grouping::{Area, AreaOfInterest},
parameters::{AuthorisationToken, NamespaceId, PayloadDigest, SubspaceId},
LengthyEntry, Path,
};
Expand Down Expand Up @@ -210,21 +210,14 @@ where

/// Locally forget all [`AuthorisedEntry`] [included](https://willowprotocol.org/specs/grouping-entries/index.html#area_include) by a given [`AreaOfInterest`], returning all forgotten entries
///
/// If the `traceless` parameter is `true`, the store will keep no record of ever having had the forgotten entries. If `false`, it *may* persist what was forgetten for an arbitrary amount of time.
///
/// Forgetting is not the same as [pruning](https://willowprotocol.org/specs/data-model/index.html#prefix_pruning)! Subsequent joins with other [`Store`]s may bring the forgotten entries back.
fn forget_area(
area: &AreaOfInterest<MCL, MCC, MPL, S>,
traceless: bool,
) -> impl Future<Output = Vec<AuthorisedEntry<MCL, MCC, MPL, N, S, PD, AT>>>;

/// Locally forget all [`AuthorisedEntry`] **not** [included](https://willowprotocol.org/specs/grouping-entries/index.html#area_include) by a given [`AreaOfInterest`], returning all forgotten entries
/// If `protected` is `Some`, then all entries [included](https://willowprotocol.org/specs/grouping-entries/index.html#area_include) by that [`Area`] will be prevented from being forgotten, even though they are included by `area`.
///
/// If the `traceless` parameter is `true`, the store will keep no record of ever having had the forgotten entries. If `false`, it *may* persist what was forgetten for an arbitrary amount of time.
///
/// Forgetting is not the same as [pruning](https://willowprotocol.org/specs/data-model/index.html#prefix_pruning)! Subsequent joins with other [`Store`]s may bring the forgotten entries back.
fn forget_everything_but_area(
fn forget_area(
area: &AreaOfInterest<MCL, MCC, MPL, S>,
protected: Option<Area<MCL, MCC, MPL, S>>,
traceless: bool,
) -> impl Future<Output = Vec<AuthorisedEntry<MCL, MCC, MPL, N, S, PD, AT>>>;

Expand Down

0 comments on commit cc2a67e

Please sign in to comment.