Struct tugger_apple_codesign::CodeResourcesRule[][src]

pub struct CodeResourcesRule {
    pub pattern: String,
    pub exclude: bool,
    pub nested: bool,
    pub omit: bool,
    pub optional: bool,
    pub weight: Option<u32>,
    // some fields omitted
}

Represents an abstract rule in a CodeResources XML plist.

This type represents both <rules> and <rules2> entries. It contains a superset of all fields for these entries.

Fields

pattern: String

The rule pattern.

The <key> in the <rules> or <rules2> dict.

exclude: bool

Whether this is an exclusion rule.

nested: boolomit: booloptional: bool

Whether the rule is optional.

weight: Option<u32>

Weighting to apply to the rule.

Implementations

impl CodeResourcesRule[src]

pub fn new(pattern: impl ToString) -> Result<Self, AppleCodesignError>[src]

pub fn exclude(self) -> Self[src]

Mark this as an exclusion rule.

Exclusion rules are internal to the builder and not materialized in the CodeResources file.

pub fn nested(self) -> Self[src]

Mark the rule as nested.

pub fn omit(self) -> Self[src]

Set the omit field.

pub fn optional(self) -> Self[src]

Mark the files matched by this rule are optional.

pub fn weight(self, v: u32) -> Self[src]

Set the weight of this rule.

Trait Implementations

impl Clone for CodeResourcesRule[src]

impl Debug for CodeResourcesRule[src]

impl Eq for CodeResourcesRule[src]

impl Ord for CodeResourcesRule[src]

impl PartialEq<CodeResourcesRule> for CodeResourcesRule[src]

impl PartialOrd<CodeResourcesRule> for CodeResourcesRule[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> SendSyncUnwindSafe for T where
    T: Send + Sync + UnwindSafe + ?Sized
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.