pub enum Policy {
Static(StaticPolicy),
Linked(LinkedPolicy),
}Expand description
A Policy can be represented either as a static policy or a linked policy. A linked policy can be transformed into a static one, but information about the template id and which slots are linked would be lost.
Variants§
Static(StaticPolicy)
Static policy, i.e. a policy with no slots
Linked(LinkedPolicy)
Linked policy, i.e. a policy with slots and their instantiation
Implementations§
Trait Implementations§
Source§impl From<LinkedPolicy> for Policy
impl From<LinkedPolicy> for Policy
Source§fn from(p: LinkedPolicy) -> Policy
fn from(p: LinkedPolicy) -> Policy
Converts to this type from the input type.
Source§impl From<StaticPolicy> for Policy
impl From<StaticPolicy> for Policy
Source§fn from(p: StaticPolicy) -> Policy
fn from(p: StaticPolicy) -> Policy
Converts to this type from the input type.
impl Eq for Policy
impl StructuralPartialEq for Policy
Auto Trait Implementations§
impl Freeze 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.Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more