pub struct RulesFile {
pub version: u32,
pub trailer_prefix: Option<TrailerPrefix>,
pub rules: Vec<Rule>,
pub default: Policy,
}Expand description
A rules file, as it is stored on disk.
Fields§
§version: u32The schema version: 1 is this shape without trailer_prefix, 2 with it,
3 without gate, 4 with a rule’s visibility.
trailer_prefix: Option<TrailerPrefix>The prefix every provenance trailer key carries, written and read.
Unset is TrailerPrefix::default, which is what this crate has always
written. A host whose branches were preserved by something spelling those
keys differently sets the prefix it already wrote, and this build then
recognizes, lists, and recovers that work — the prefix is the whole hook,
and no particular value of it means anything here.
rules: Vec<Rule>The rules, in priority order: the first one that matches wins.
default: PolicyThe policy for a repository no rule matches.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for RulesFile
impl<'de> Deserialize<'de> for RulesFile
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
impl Eq for RulesFile
impl StructuralPartialEq for RulesFile
Auto Trait Implementations§
impl Freeze for RulesFile
impl RefUnwindSafe for RulesFile
impl Send for RulesFile
impl Sync for RulesFile
impl Unpin for RulesFile
impl UnsafeUnpin for RulesFile
impl UnwindSafe for RulesFile
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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.