Trait sda_protocol::SdaRecipientService
[−]
[src]
pub trait SdaRecipientService: SdaBaseService { fn create_aggregation(&self,
caller: &Agent,
aggregation: &Aggregation)
-> SdaResult<()>; fn delete_aggregation(&self,
caller: &Agent,
aggregation: &AggregationId)
-> SdaResult<()>; fn suggest_committee(&self,
caller: &Agent,
aggregation: &AggregationId)
-> SdaResult<Vec<ClerkCandidate>>; fn create_committee(&self,
caller: &Agent,
committee: &Committee)
-> SdaResult<()>; fn get_aggregation_status(&self,
caller: &Agent,
aggregation: &AggregationId)
-> SdaResult<Option<AggregationStatus>>; fn create_snapshot(&self,
caller: &Agent,
snapshot: &Snapshot)
-> SdaResult<()>; fn get_snapshot_result(&self,
caller: &Agent,
aggregation: &AggregationId,
snapshot: &SnapshotId)
-> SdaResult<Option<SnapshotResult>>; }
Methods used by the recipient in particular.
Required Methods
fn create_aggregation(&self,
caller: &Agent,
aggregation: &Aggregation)
-> SdaResult<()>
caller: &Agent,
aggregation: &Aggregation)
-> SdaResult<()>
Create a new aggregation on the service (without any associated result). If successful, the original id has been replaced by the returned id.
fn delete_aggregation(&self,
caller: &Agent,
aggregation: &AggregationId)
-> SdaResult<()>
caller: &Agent,
aggregation: &AggregationId)
-> SdaResult<()>
Delete all information (including results) regarding an aggregation.
fn suggest_committee(&self,
caller: &Agent,
aggregation: &AggregationId)
-> SdaResult<Vec<ClerkCandidate>>
caller: &Agent,
aggregation: &AggregationId)
-> SdaResult<Vec<ClerkCandidate>>
Propose suitable members for a committee, taking into account the aggregation constraints.
fn create_committee(&self,
caller: &Agent,
committee: &Committee)
-> SdaResult<()>
caller: &Agent,
committee: &Committee)
-> SdaResult<()>
Set the committee for an aggregation.
fn get_aggregation_status(&self,
caller: &Agent,
aggregation: &AggregationId)
-> SdaResult<Option<AggregationStatus>>
caller: &Agent,
aggregation: &AggregationId)
-> SdaResult<Option<AggregationStatus>>
Poll status of an aggregation.
fn create_snapshot(&self, caller: &Agent, snapshot: &Snapshot) -> SdaResult<()>
Create a snapshot for an aggregation.
fn get_snapshot_result(&self,
caller: &Agent,
aggregation: &AggregationId,
snapshot: &SnapshotId)
-> SdaResult<Option<SnapshotResult>>
caller: &Agent,
aggregation: &AggregationId,
snapshot: &SnapshotId)
-> SdaResult<Option<SnapshotResult>>
Retrieve results of an aggregation.