Struct Callbacks
pub struct Callbacks { /* private fields */ }Expand description
Provides a simple implementation of the FapiCallbacks trait.
Implementations§
§impl Callbacks
impl Callbacks
pub fn new<AuthFn, SignFn, BranchFn, PolicyActionFn>(
auth_fn: AuthFn,
sign_fn: SignFn,
branch_fn: BranchFn,
policy_action_fn: PolicyActionFn,
) -> Self
pub fn new<AuthFn, SignFn, BranchFn, PolicyActionFn>( auth_fn: AuthFn, sign_fn: SignFn, branch_fn: BranchFn, policy_action_fn: PolicyActionFn, ) -> Self
Creates a new Callbacks instance with application-defined callback functions.
Instances of this struct are registered with a FAPI context via the FapiContext::set_callbacks() function.
pub fn with_auth<F>(auth_fn: F) -> Self
pub fn with_auth<F>(auth_fn: F) -> Self
Creates a Callbacks instance with an application-defined auth_cb callback function.
All other callback functions will use the default implementation.
pub fn with_sign<F>(sign_fn: F) -> Self
pub fn with_sign<F>(sign_fn: F) -> Self
Creates a Callbacks instance with an application-defined sign_cb callback function.
All other callback functions will use the default implementation.
pub fn with_branch<F>(branch_fn: F) -> Self
pub fn with_branch<F>(branch_fn: F) -> Self
Creates a Callbacks instance with an application-defined branch_cb callback function.
All other callback functions will use the default implementation.
pub fn with_policy_action<F>(policy_action_fn: F) -> Self
pub fn with_policy_action<F>(policy_action_fn: F) -> Self
Creates a Callbacks instance with an application-defined policy_action_cb callback function.
All other callback functions will use the default implementation.