Struct gekko::runtime::kusama::extrinsics::society::Vote [−][src]
pub struct Vote<A, B> where
A: Encode + Decode,
B: Encode + Decode, {
pub candidate: A,
pub approve: B,
}
Expand description
As a member, vote on a candidate.
Documentation (provided by the runtime metadata)
As a member, vote on a candidate.
The dispatch origin for this call must be Signed and a member.
Parameters:
candidate
: The candidate that the member would like to bid on.approve
: A boolean which says if the candidate should be approved (true
) or rejected (false
).
Key: C (len of candidates), M (len of members)
- One storage read O(M) and O(log M) search to check user is a member.
- One account lookup.
- One storage read O(C) and O(C) search to check that user is a candidate.
- One storage write to add vote to votes. O(1)
- One event.
Total Complexity: O(M + logM + C)
Type Disclaimer
This library makes no assumptions about parameter types and must be specified manually as generic types. Each field contains a type description which can serve as a hint on what type is being expected, as provided by the runtime meatadata. See the common
module for common types which can be used.
Fields
candidate: A
Type description: <T::Lookup as StaticLookup>::Source
approve: B
Type description: bool
Trait Implementations
Auto Trait Implementations
impl<A, B> RefUnwindSafe for Vote<A, B> where
A: RefUnwindSafe,
B: RefUnwindSafe,
impl<A, B> UnwindSafe for Vote<A, B> where
A: UnwindSafe,
B: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
type Output = T
type Output = T
Should always be Self
The counterpart to unchecked_from
.