privacy_allow_list

Function privacy_allow_list 

Source
pub fn privacy_allow_list(
    raw: RawDoc,
    allow: BTreeSet<Did>,
    disallow: BTreeSet<Did>,
) -> Result<RawDoc, PrivacyAllowList>
Expand description

Change the allow set of a document if the visibility is set to Visibility::Private.

All Dids in the allow set are added to the set, while all Dids in the disallow set are removed from the set.

ยงErrors

This will fail when allow and disallow are not disjoint, i.e. they contain at least share one Did.

This will fail when the Visibility of the document is Visibility::Public.