pub struct ActionSet(u8);Expand description
The core’s own types, re-exported: every field of
record::ParsedPolicy is one of these, so a caller that declares a
policy reaches them through this crate rather than depending on
didbot-policy for the names alone.
Which WriteActions a write-shaped applicability declaration covers.
A small closed set, so a bitset rather than a Vec — cheap to copy and
cheap to test membership in on the hot path.
Tuple Fields§
§0: u8Implementations§
Source§impl ActionSet
impl ActionSet
Sourcepub fn of(actions: &[WriteAction]) -> ActionSet
pub fn of(actions: &[WriteAction]) -> ActionSet
Only the given actions match. plan/policy.md takes no position on
what a delete means, so a policy that wants nothing to do with
deletes states that here, explicitly, rather than the core inferring
it from an empty diff.
Sourcepub fn contains(&self, action: WriteAction) -> bool
pub fn contains(&self, action: WriteAction) -> bool
Whether action is in this set.
Trait Implementations§
impl Copy for ActionSet
impl Eq for ActionSet
impl StructuralPartialEq for ActionSet
Auto Trait Implementations§
impl Freeze for ActionSet
impl RefUnwindSafe for ActionSet
impl Send for ActionSet
impl Sync for ActionSet
impl Unpin for ActionSet
impl UnsafeUnpin for ActionSet
impl UnwindSafe for ActionSet
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,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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 more