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§
Sourcefn hot(
&self,
subject: &SubjectBinding,
action: HotAction,
now: u64,
) -> Result<GrantReceipt, AccessDecisionError>
fn hot( &self, subject: &SubjectBinding, action: HotAction, now: u64, ) -> Result<GrantReceipt, AccessDecisionError>
Sourcefn live(
&self,
resource: &AccessResource,
action: AccessAction,
now: u64,
) -> Result<DeliberateDecision, AccessDecisionError>
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".