pub struct PolicyView {
pub enforced: Option<String>,
pub policies: Vec<PolicyRecordView>,
pub bindings: Vec<PolicyBindingView>,
pub refused: Vec<PolicyRefusalView>,
pub carried: Vec<PolicyRefusalView>,
}Expand description
The policy member of StatsResponse.
The digest alone answers “is this server on my newest edit”; the lists
answer the two questions that follow, which are “which of my records is
it enforcing, and on whom” and “why is the one I just wrote not among
them”. Every value here is either a record key from the operator’s own
public repository or a DID bot.did.listAgents answers with, so this
carries the same Credential::Disclosure decision the rest of
bot.did.stats does.
Fields§
§enforced: Option<String>The digest of the operator’s policy and binding records this deployment enforces, over every record’s key and body. An operator computes the same digest over their own repository and compares; absent until a revision has been read.
policies: Vec<PolicyRecordView>Every bot.did.policy record in force, by record key.
bindings: Vec<PolicyBindingView>Every bot.did.policyBinding record in force, by record key.
refused: Vec<PolicyRefusalView>Every record the newest build would not honour and had nothing in force at its key to keep. These enforce nothing.
carried: Vec<PolicyRefusalView>Every record the newest build would not honour where the record in force at its key keeps being enforced. The reason is the newer record’s, and what is enforced is the older one.
Implementations§
Source§impl PolicyView
impl PolicyView
Sourcepub fn of(set: &EnforcedSet) -> Self
pub fn of(set: &EnforcedSet) -> Self
The view of set, as the gate holds it.
Trait Implementations§
Source§impl Clone for PolicyView
impl Clone for PolicyView
Source§fn clone(&self) -> PolicyView
fn clone(&self) -> PolicyView
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for PolicyView
impl Debug for PolicyView
Source§impl Default for PolicyView
impl Default for PolicyView
Source§fn default() -> PolicyView
fn default() -> PolicyView
Source§impl<'de> Deserialize<'de> for PolicyView
impl<'de> Deserialize<'de> for PolicyView
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for PolicyView
impl PartialEq for PolicyView
Source§fn eq(&self, other: &PolicyView) -> bool
fn eq(&self, other: &PolicyView) -> bool
self and other values to be equal, and is used by ==.Source§impl Serialize for PolicyView
impl Serialize for PolicyView
impl Eq for PolicyView
impl StructuralPartialEq for PolicyView
Auto Trait Implementations§
impl Freeze for PolicyView
impl RefUnwindSafe for PolicyView
impl Send for PolicyView
impl Sync for PolicyView
impl Unpin for PolicyView
impl UnsafeUnpin for PolicyView
impl UnwindSafe for PolicyView
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
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
§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
key and return true if they are equal.§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
§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>
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>
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