pub struct Policy {
pub machine_path: Option<PathBuf>,
pub machine_present: bool,
pub extra_path: Option<PathBuf>,
/* private fields */
}Expand description
The policy in force.
Fields§
§machine_path: Option<PathBuf>Where the machine file is, or would be, on this OS. None when the
location cannot be worked out, which happens only on Windows with no
ProgramData at all.
machine_present: boolWhether the machine file is present and was read.
extra_path: Option<PathBuf>The extra file, if MEMFORK_POLICY_FILE named one that was read.
Implementations§
Source§impl Policy
impl Policy
Sourcepub fn permissive() -> Self
pub fn permissive() -> Self
No file anywhere: everything allowed.
Sourcepub fn forbidden_by(&self, feature: Feature) -> Option<Origin>
pub fn forbidden_by(&self, feature: Feature) -> Option<Origin>
Which file switched a feature off, if one did.
Sourcepub fn path_of(&self, origin: Origin) -> String
pub fn path_of(&self, origin: Origin) -> String
The path of the file an origin names, for messages.
Trait Implementations§
impl Eq for Policy
impl StructuralPartialEq for Policy
Auto Trait Implementations§
impl Forget for Policy
impl Freeze for Policy
impl Move for Policy
impl RefUnwindSafe for Policy
impl Send for Policy
impl Sync for Policy
impl Unpin for Policy
impl UnsafeUnpin for Policy
impl UnwindSafe for Policy
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.