Skip to main content

ServiceDecider

Trait ServiceDecider 

Source
pub trait ServiceDecider {
    // Required methods
    fn hot(
        &self,
        subject: &SubjectBinding,
        action: HotAction,
        now: u64,
    ) -> Result<GrantReceipt, AccessDecisionError>;
    fn live(
        &self,
        resource: &AccessResource,
        action: AccessAction,
        now: u64,
    ) -> Result<DeliberateDecision, AccessDecisionError>;
}
Expand description

Who decides a service request: the admitted pass through its consumer, or a connection’s admitted LysSession.

Both reach the same two seams, the hot decision offline and the deliberate one live, so a request is decided once, the same way, from either door.

Required Methods§

Source

fn hot( &self, subject: &SubjectBinding, action: HotAction, now: u64, ) -> Result<GrantReceipt, AccessDecisionError>

Decides one hot action on the bound subject, offline.

§Errors

Refused, by cause.

Source

fn live( &self, resource: &AccessResource, action: AccessAction, now: u64, ) -> Result<DeliberateDecision, AccessDecisionError>

Asks Lys live for action on resource.

§Errors

Refused, by cause; DeliberateUnavailable without a live seam.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§