pub struct DeniedHashes(/* private fields */);Expand description
Operator-denied blob hashes — the local denylist from ADR 011 §Local
Denylist ([content] denied_hashes). A hash here is refused at the delivery
path immediately, whether or not the node holds it.
This is the “future blocklist” PinnedHashes warns about, and it is a
distinct nominal type for exactly that reason: the two are both
HashSet<Hash> and mean opposite things, so a mix-up would silently pin the
content an operator was ordered to remove. There is deliberately no
conversion between them.
Held as Arc<HashSet<Hash>> so the reload path can swap the active set
without cloning.
Implementations§
Source§impl DeniedHashes
impl DeniedHashes
Sourcepub fn new(set: HashSet<Hash>) -> DeniedHashes
pub fn new(set: HashSet<Hash>) -> DeniedHashes
Build a DeniedHashes from a freshly parsed set.
Sourcepub fn empty() -> DeniedHashes
pub fn empty() -> DeniedHashes
The empty denylist.
Trait Implementations§
Source§impl Clone for DeniedHashes
impl Clone for DeniedHashes
Source§fn clone(&self) -> DeniedHashes
fn clone(&self) -> DeniedHashes
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DeniedHashes
impl Debug for DeniedHashes
Source§impl Default for DeniedHashes
impl Default for DeniedHashes
Source§fn default() -> DeniedHashes
fn default() -> DeniedHashes
Returns the “default value” for a type. Read more
Source§impl<'a> IntoIterator for &'a DeniedHashes
impl<'a> IntoIterator for &'a DeniedHashes
Auto Trait Implementations§
impl Freeze for DeniedHashes
impl RefUnwindSafe for DeniedHashes
impl Send for DeniedHashes
impl Sync for DeniedHashes
impl Unpin for DeniedHashes
impl UnsafeUnpin for DeniedHashes
impl UnwindSafe for DeniedHashes
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreCreates a shared type from an unshared type.