pub trait Policy {
// Required methods
fn check_transaction(&self, request: &AuthorizeRequest) -> Result<()>;
fn check_validator_definition(
&self,
_request: &AuthorizeValidatorDefinitionRequest,
) -> Result<()>;
fn check_validator_vote(
&self,
_request: &AuthorizeValidatorVoteRequest,
) -> Result<()>;
}
Expand description
A trait for checking whether a transaction plan is allowed by a policy.
Required Methods§
Sourcefn check_transaction(&self, request: &AuthorizeRequest) -> Result<()>
fn check_transaction(&self, request: &AuthorizeRequest) -> Result<()>
Checks whether the proposed transaction plan is allowed by this policy.
Sourcefn check_validator_definition(
&self,
_request: &AuthorizeValidatorDefinitionRequest,
) -> Result<()>
fn check_validator_definition( &self, _request: &AuthorizeValidatorDefinitionRequest, ) -> Result<()>
Checks whether the proposed validator definition is allowed by this policy.
Sourcefn check_validator_vote(
&self,
_request: &AuthorizeValidatorVoteRequest,
) -> Result<()>
fn check_validator_vote( &self, _request: &AuthorizeValidatorVoteRequest, ) -> Result<()>
Checks whether the proposed validator vote is allowed by this policy.