Function wallet_core::c::vote::proposal_new
source · pub unsafe fn proposal_new<P>(
vote_plan_id: *const u8,
index: u8,
num_choices: u8,
payload_type: P,
proposal_out: *mut ProposalPtr
) -> Resultwhere
P: TryInto<PayloadTypeConfig>,
P::Error: Into<Result>,
Expand description
build the proposal object
Errors
This function may fail if:
- a null pointer was provided as an argument.
num_choices
is out of the allowed range.
Safety
This function dereference raw pointers. Even though the function checks if the pointers are null. Mind not to put random values in or you may see unexpected behaviors.