pub struct RulesBuilder {
pub voting_period: u32,
pub quorum: Decimal,
pub threshold: Decimal,
pub allow_end_early: bool,
}
Fields§
§voting_period: u32
§quorum: Decimal
§threshold: Decimal
§allow_end_early: bool
Implementations§
Source§impl RulesBuilder
impl RulesBuilder
pub fn new() -> Self
pub fn with_threshold(self, threshold: impl Into<Decimal>) -> Self
pub fn with_quorum(self, quorum: impl Into<Decimal>) -> Self
pub fn build(&self) -> VotingRules
Trait Implementations§
Auto Trait Implementations§
impl Freeze for RulesBuilder
impl RefUnwindSafe for RulesBuilder
impl Send for RulesBuilder
impl Sync for RulesBuilder
impl Unpin for RulesBuilder
impl UnwindSafe for RulesBuilder
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