pub struct SharedTracker { /* private fields */ }Implementations§
pub fn init() -> Self
pub fn create_or_update( &mut self, id: SharedId, owners: HashSet<PlayerId>, min_difference: u64, min_votes: u64, ) -> Result<(), Error>
pub fn is_owner(&self, id: &SharedId, player: &PlayerId) -> Result<bool, Error>
pub fn add_proposal( &mut self, id: u64, target: SharedId, action: Action, ) -> Result<(), Error>
pub fn vote( &mut self, id: u64, player: PlayerId, agree: bool, ) -> Result<Option<Action>, Error>
pub fn wind_up( &mut self, id: SharedId, clean_one: impl FnMut(&SharedId), ) -> Result<(), Error>
pub fn contains(&self, id: &SharedId) -> bool
pub fn the_bank(&self) -> &SharedAccount
Trait Implementations§
Auto Trait Implementations§
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