#[non_exhaustive]pub struct StaticPolicy { /* private fields */ }Expand description
A static policy, i.e. a policy without slots.
To build a StaticPolicy from its body (a Template without slots), you should use
StaticPolicy::try_from, which will validate that the body does not contain any slot.
Implementations§
Trait Implementations§
Source§impl Clone for StaticPolicy
impl Clone for StaticPolicy
Source§fn clone(&self) -> StaticPolicy
fn clone(&self) -> StaticPolicy
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 moreSource§impl Debug for StaticPolicy
impl Debug for StaticPolicy
Source§impl Display for StaticPolicy
impl Display for StaticPolicy
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.
Source§impl PartialEq for StaticPolicy
impl PartialEq for StaticPolicy
Source§fn eq(&self, other: &StaticPolicy) -> bool
fn eq(&self, other: &StaticPolicy) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl TryFrom<Template> for StaticPolicy
impl TryFrom<Template> for StaticPolicy
Source§type Error = ContainsSlotError
type Error = ContainsSlotError
The type returned in the event of a conversion error.
Source§fn try_from(
body: Template,
) -> Result<StaticPolicy, <StaticPolicy as TryFrom<Template>>::Error>
fn try_from( body: Template, ) -> Result<StaticPolicy, <StaticPolicy as TryFrom<Template>>::Error>
Performs the conversion.
impl Eq for StaticPolicy
impl StructuralPartialEq for StaticPolicy
Auto Trait Implementations§
impl Freeze for StaticPolicy
impl RefUnwindSafe for StaticPolicy
impl Send for StaticPolicy
impl Sync for StaticPolicy
impl Unpin for StaticPolicy
impl UnsafeUnpin for StaticPolicy
impl UnwindSafe for StaticPolicy
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