pub struct LoadedPolicy {
pub policy: Policy,
pub path: String,
pub sha256: String,
}Expand description
The policy as loaded: the typed value, where it came from, and the hash the stamps carry.
Fields§
§policy: PolicyThe typed policy.
path: StringRepository-relative path of the policy file.
sha256: StringSHA-256 (hex) of the normal_form of the policy file followed by that of every
profile file, in name order, concatenated: exactly what the shell tool’s
mj_policy_cat hashes. A comment or a blank line does not move it (I1991).
Implementations§
Source§impl LoadedPolicy
impl LoadedPolicy
Sourcepub fn load(repository: &Repository) -> Result<Self, Error>
pub fn load(repository: &Repository) -> Result<Self, Error>
Read the policy and profiles of a repository.
Trait Implementations§
Source§impl Clone for LoadedPolicy
impl Clone for LoadedPolicy
Source§fn clone(&self) -> LoadedPolicy
fn clone(&self) -> LoadedPolicy
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 moreAuto Trait Implementations§
impl Freeze for LoadedPolicy
impl RefUnwindSafe for LoadedPolicy
impl Send for LoadedPolicy
impl Sync for LoadedPolicy
impl Unpin for LoadedPolicy
impl UnsafeUnpin for LoadedPolicy
impl UnwindSafe for LoadedPolicy
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