pub fn close(&mut self, ctx: &Context) -> Result<()> {
        if self.admin != ctx.sender() {
            return Err("You cannot close the ballot.".to_string());
        }
        self.accepting_votes = false;
        Ok(())
    }
/// Closes this ballot so that it no longer collects votes.
/// Only the ballot creator can close voting.

Closes this ballot so that it no longer collects votes.
Only the ballot creator can close voting.
Closes this ballot so that it no longer collects votes . Only the ballot creator can close voting .
pub fn close(&mut self, ctx: &Context) -> Result<()> {
        if self.admin != ctx.sender() {
            return Err("You cannot close the ballot.".to_string());
        }
        self.accepting_votes = false;
        Ok(())
    }
pub fn close ( & mut self , ctx : & Context ) -> Result < ( ) > { if self . admin != ctx . sender ( ) { return Err ( " " . to_string ( ) ) ; } self . accepting_votes = false ; Ok ( ( ) ) }
Closes this ballot so that it no longer collects votes.
Closes this ballot so that it no longer collects votes .
&mut self
ctx
&Context