pub trait ThresholdApprovalCollectorStore: Send + Sync {
// Required methods
fn create(
&self,
proposal: &ThresholdApprovalCollectorProposal,
) -> Result<(), ThresholdApprovalCollectorStoreError>;
fn get(
&self,
proposal_id: &str,
) -> Result<Option<ThresholdApprovalCollectorProposal>, ThresholdApprovalCollectorStoreError>;
fn append_token(
&self,
proposal_id: &str,
expected_version: u64,
token: &GovernedApprovalToken,
replaced_token_id: Option<&str>,
next_state: ThresholdApprovalCollectorState,
updated_at: u64,
) -> Result<ThresholdApprovalCollectorProposal, ThresholdApprovalCollectorStoreError>;
fn transition(
&self,
proposal_id: &str,
expected_version: u64,
next_state: ThresholdApprovalCollectorState,
updated_at: u64,
) -> Result<ThresholdApprovalCollectorProposal, ThresholdApprovalCollectorStoreError>;
}Required Methods§
fn create( &self, proposal: &ThresholdApprovalCollectorProposal, ) -> Result<(), ThresholdApprovalCollectorStoreError>
fn get( &self, proposal_id: &str, ) -> Result<Option<ThresholdApprovalCollectorProposal>, ThresholdApprovalCollectorStoreError>
fn append_token( &self, proposal_id: &str, expected_version: u64, token: &GovernedApprovalToken, replaced_token_id: Option<&str>, next_state: ThresholdApprovalCollectorState, updated_at: u64, ) -> Result<ThresholdApprovalCollectorProposal, ThresholdApprovalCollectorStoreError>
fn transition( &self, proposal_id: &str, expected_version: u64, next_state: ThresholdApprovalCollectorState, updated_at: u64, ) -> Result<ThresholdApprovalCollectorProposal, ThresholdApprovalCollectorStoreError>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".