pub struct ReputationProposer { /* private fields */ }Expand description
Aptos LeaderReputation proposer.
Wraps a shared LeaderReputation state and dispatches to its seeded
weighted draw. The wrapped state is the same one the engine feeds with
record_round_outcome / record_round_voters after each round closes —
so the reputation evolves alongside consensus rather than being a
per-call computation.
Implementations§
Source§impl ReputationProposer
impl ReputationProposer
Sourcepub fn new(reputation: Arc<LeaderReputation>) -> Self
pub fn new(reputation: Arc<LeaderReputation>) -> Self
Wraps an existing LeaderReputation instance.
Sourcepub fn reputation(&self) -> &Arc<LeaderReputation> ⓘ
pub fn reputation(&self) -> &Arc<LeaderReputation> ⓘ
Borrowed handle to the wrapped reputation state — useful for the engine to record outcomes / voters after round close without going through the trait.
Trait Implementations§
Source§impl Clone for ReputationProposer
impl Clone for ReputationProposer
Source§fn clone(&self) -> ReputationProposer
fn clone(&self) -> ReputationProposer
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for ReputationProposer
impl !UnwindSafe for ReputationProposer
impl Freeze for ReputationProposer
impl Send for ReputationProposer
impl Sync for ReputationProposer
impl Unpin for ReputationProposer
impl UnsafeUnpin for ReputationProposer
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more