pub struct GovernanceProposal<M: ManagedTypeApi> {
pub proposer: ManagedAddress<M>,
pub actions: ArrayVec<GovernanceAction<M>, MAX_GOVERNANCE_PROPOSAL_ACTIONS>,
pub description: ManagedBuffer<M>,
pub fees: ProposalFees<M>,
}
Fields§
§proposer: ManagedAddress<M>
§actions: ArrayVec<GovernanceAction<M>, MAX_GOVERNANCE_PROPOSAL_ACTIONS>
§description: ManagedBuffer<M>
§fees: ProposalFees<M>
Trait Implementations§
source§impl<M: ManagedTypeApi> TopDecode for GovernanceProposal<M>
impl<M: ManagedTypeApi> TopDecode for GovernanceProposal<M>
source§fn top_decode_or_handle_err<I, H>(
top_input: I,
h: H
) -> Result<Self, H::HandledErr>where
I: TopDecodeInput,
H: DecodeErrorHandler,
fn top_decode_or_handle_err<I, H>(
top_input: I,
h: H
) -> Result<Self, H::HandledErr>where
I: TopDecodeInput,
H: DecodeErrorHandler,
Version of
top_decode
that can handle errors as soon as they occur.
For instance it can exit immediately and make sure that if it returns, it is a success.
By not deferring error handling, this can lead to somewhat smaller bytecode.§fn top_decode<I>(input: I) -> Result<Self, DecodeError>where
I: TopDecodeInput,
fn top_decode<I>(input: I) -> Result<Self, DecodeError>where
I: TopDecodeInput,
Attempt to deserialize the value from input.
source§impl<M: ManagedTypeApi> TopEncode for GovernanceProposal<M>
impl<M: ManagedTypeApi> TopEncode for GovernanceProposal<M>
source§fn top_encode_or_handle_err<O, H>(
&self,
output: O,
h: H
) -> Result<(), H::HandledErr>where
O: TopEncodeOutput,
H: EncodeErrorHandler,
fn top_encode_or_handle_err<O, H>(
&self,
output: O,
h: H
) -> Result<(), H::HandledErr>where
O: TopEncodeOutput,
H: EncodeErrorHandler,
Version of
top_encode
that can handle errors as soon as they occur.
For instance in can exit immediately and make sure that if it returns, it is a success.
By not deferring error handling, this can lead to somewhat smaller bytecode.§fn top_encode<O>(&self, output: O) -> Result<(), EncodeError>where
O: TopEncodeOutput,
fn top_encode<O>(&self, output: O) -> Result<(), EncodeError>where
O: TopEncodeOutput,
Attempt to serialize the value to ouput.
source§impl<M: ManagedTypeApi> TypeAbi for GovernanceProposal<M>
impl<M: ManagedTypeApi> TypeAbi for GovernanceProposal<M>
fn type_name() -> TypeName
source§fn provide_type_descriptions<TDC: TypeDescriptionContainer>(
accumulator: &mut TDC
)
fn provide_type_descriptions<TDC: TypeDescriptionContainer>(
accumulator: &mut TDC
)
A type can provide more than its own description.
For instance, a struct can also provide the descriptions of the type of its fields.
TypeAbi doesn’t care for the exact accumulator type,
which is abstracted by the TypeDescriptionContainer trait.
Auto Trait Implementations§
impl<M> CodecFromSelf for GovernanceProposal<M>
impl<M> RefUnwindSafe for GovernanceProposal<M>where
<M as HandleTypeInfo>::BigIntHandle: RefUnwindSafe,
<M as HandleTypeInfo>::ManagedBufferHandle: RefUnwindSafe,
impl<M> Send for GovernanceProposal<M>where
<M as HandleTypeInfo>::BigIntHandle: Send,
<M as HandleTypeInfo>::ManagedBufferHandle: Send,
impl<M> Sync for GovernanceProposal<M>where
<M as HandleTypeInfo>::BigIntHandle: Sync,
<M as HandleTypeInfo>::ManagedBufferHandle: Sync,
impl<M> Unpin for GovernanceProposal<M>where
<M as HandleTypeInfo>::BigIntHandle: Unpin,
<M as HandleTypeInfo>::ManagedBufferHandle: Unpin,
impl<M> UnwindSafe for GovernanceProposal<M>where
<M as HandleTypeInfo>::BigIntHandle: UnwindSafe,
<M as HandleTypeInfo>::ManagedBufferHandle: UnwindSafe,
Blanket Implementations§
source§impl<T> SCCodec for Twhere
T: TopEncode,
impl<T> SCCodec for Twhere
T: TopEncode,
fn fmt<F>(&self, f: &mut F)where
F: FormatByteReceiver,
§impl<T> TopDecodeMulti for Twhere
T: TopDecode,
impl<T> TopDecodeMulti for Twhere
T: TopDecode,
§const IS_SINGLE_VALUE: bool = true
const IS_SINGLE_VALUE: bool = true
Used to optimize single value loading of endpoint arguments.
fn multi_decode_or_handle_err<I, H>(
input: &mut I,
h: H
) -> Result<T, <H as DecodeErrorHandler>::HandledErr>where
I: TopDecodeMultiInput,
H: DecodeErrorHandler,
fn multi_decode<I>(input: &mut I) -> Result<Self, DecodeError>where
I: TopDecodeMultiInput,
§impl<T> TopDecodeMultiLength for Twhere
T: TopEncode + TopDecode,
impl<T> TopDecodeMultiLength for Twhere
T: TopEncode + TopDecode,
§impl<T> TopEncodeMulti for Twhere
T: TopEncode,
impl<T> TopEncodeMulti for Twhere
T: TopEncode,
§fn multi_encode_or_handle_err<O, H>(
&self,
output: &mut O,
h: H
) -> Result<(), <H as EncodeErrorHandler>::HandledErr>where
O: TopEncodeMultiOutput,
H: EncodeErrorHandler,
fn multi_encode_or_handle_err<O, H>(
&self,
output: &mut O,
h: H
) -> Result<(), <H as EncodeErrorHandler>::HandledErr>where
O: TopEncodeMultiOutput,
H: EncodeErrorHandler,
Version of
top_encode
that can handle errors as soon as they occur.
For instance in can exit immediately and make sure that if it returns, it is a success.
By not deferring error handling, this can lead to somewhat smaller bytecode.§fn multi_encode<O>(&self, output: &mut O) -> Result<(), EncodeError>where
O: TopEncodeMultiOutput,
fn multi_encode<O>(&self, output: &mut O) -> Result<(), EncodeError>where
O: TopEncodeMultiOutput,
Attempt to serialize the value to ouput.