pub struct ScriptPolicies { /* private fields */ }Expand description
A shell’s policies, each bound to the state of the agent the shell serves.
Implementations§
Source§impl ScriptPolicies
impl ScriptPolicies
Sourcepub fn new(policies: Vec<AnyScriptPolicy>) -> Self
pub fn new(policies: Vec<AnyScriptPolicy>) -> Self
policies, bound to a fresh agent.
Sourcepub async fn check(&self, script: &ScriptCheck<'_>) -> ScriptDecision
pub async fn check(&self, script: &ScriptCheck<'_>) -> ScriptDecision
Puts script to every policy; the strictest decision wins, the
first of equally strict ones in registration order.
Trait Implementations§
Source§impl Clone for ScriptPolicies
impl Clone for ScriptPolicies
Source§impl Debug for ScriptPolicies
impl Debug for ScriptPolicies
Auto Trait Implementations§
impl !RefUnwindSafe for ScriptPolicies
impl !UnwindSafe for ScriptPolicies
impl Forget for ScriptPolicies
impl Freeze for ScriptPolicies
impl Move for ScriptPolicies
impl Send for ScriptPolicies
impl Sync for ScriptPolicies
impl Unpin for ScriptPolicies
impl UnsafeUnpin for ScriptPolicies
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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