pub struct StrategyEffectPermit { /* private fields */ }Expand description
One effect permit: the exact command, authorization and effect identity the host issued it for.
The permit is data, not authority. Issuing it proves only that the runtime assembled the three identities; the port that consumes it re-checks them against its own resolution before any external work happens.
Implementations§
Source§impl StrategyEffectPermit
impl StrategyEffectPermit
pub fn issue( command_id: &str, authorization_digest: &str, effect_fingerprint: &str, ) -> Result<StrategyEffectPermit, Error>
Sourcepub fn consume(
&mut self,
command: &RunCommand,
authorization_digest: &str,
effect_fingerprint: &str,
) -> Result<(), Error>
pub fn consume( &mut self, command: &RunCommand, authorization_digest: &str, effect_fingerprint: &str, ) -> Result<(), Error>
Consume the permit for exactly the effect it was issued for. A second consume, or a command that does not match the issued identities, fails instead of running anything.
Trait Implementations§
Source§impl Clone for StrategyEffectPermit
impl Clone for StrategyEffectPermit
Source§fn clone(&self) -> StrategyEffectPermit
fn clone(&self) -> StrategyEffectPermit
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 moreAuto Trait Implementations§
impl Forget for StrategyEffectPermit
impl Freeze for StrategyEffectPermit
impl Move for StrategyEffectPermit
impl RefUnwindSafe for StrategyEffectPermit
impl Send for StrategyEffectPermit
impl Sync for StrategyEffectPermit
impl Unpin for StrategyEffectPermit
impl UnsafeUnpin for StrategyEffectPermit
impl UnwindSafe for StrategyEffectPermit
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