pub struct PolicyFile {
pub blocked_producers: Vec<BlockedProducer>,
}Fields§
§blocked_producers: Vec<BlockedProducer>Implementations§
Source§impl PolicyFile
impl PolicyFile
Sourcepub fn is_blocked(&self, tool: &str) -> bool
pub fn is_blocked(&self, tool: &str) -> bool
Whether the named tool is on the block list.
Sourcepub fn find(&self, tool: &str) -> Option<&BlockedProducer>
pub fn find(&self, tool: &str) -> Option<&BlockedProducer>
Look up the block entry, if any. Useful for “blocked since X — reason: Y” rendering.
Trait Implementations§
Source§impl Clone for PolicyFile
impl Clone for PolicyFile
Source§fn clone(&self) -> PolicyFile
fn clone(&self) -> PolicyFile
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 PolicyFile
impl Debug for PolicyFile
Source§impl Default for PolicyFile
impl Default for PolicyFile
Source§fn default() -> PolicyFile
fn default() -> PolicyFile
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for PolicyFile
impl<'de> Deserialize<'de> for PolicyFile
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>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for PolicyFile
impl PartialEq for PolicyFile
Source§fn eq(&self, other: &PolicyFile) -> bool
fn eq(&self, other: &PolicyFile) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for PolicyFile
impl Serialize for PolicyFile
impl Eq for PolicyFile
impl StructuralPartialEq for PolicyFile
Auto Trait Implementations§
impl Freeze for PolicyFile
impl RefUnwindSafe for PolicyFile
impl Send for PolicyFile
impl Sync for PolicyFile
impl Unpin for PolicyFile
impl UnsafeUnpin for PolicyFile
impl UnwindSafe for PolicyFile
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.