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.Source§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.Source§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>
type Unmanaged = 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 name.
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.
fn type_names() -> TypeNames
fn type_name_rust() -> String
impl<M: ManagedTypeApi> TypeAbiFrom<&GovernanceProposal<M>> for GovernanceProposal<M>
impl<M: ManagedTypeApi> TypeAbiFrom<GovernanceProposal<M>> for GovernanceProposal<M>
Auto Trait Implementations§
impl<M> Freeze for GovernanceProposal<M>where
<M as HandleTypeInfo>::ManagedBufferHandle: Freeze,
<M as HandleTypeInfo>::BigIntHandle: Freeze,
impl<M> RefUnwindSafe for GovernanceProposal<M>where
<M as HandleTypeInfo>::ManagedBufferHandle: RefUnwindSafe,
<M as HandleTypeInfo>::BigIntHandle: RefUnwindSafe,
M: RefUnwindSafe,
impl<M> Send for GovernanceProposal<M>where
<M as HandleTypeInfo>::ManagedBufferHandle: Send,
<M as HandleTypeInfo>::BigIntHandle: Send,
M: Send,
impl<M> Sync for GovernanceProposal<M>where
<M as HandleTypeInfo>::ManagedBufferHandle: Sync,
<M as HandleTypeInfo>::BigIntHandle: Sync,
M: Sync,
impl<M> Unpin for GovernanceProposal<M>where
<M as HandleTypeInfo>::ManagedBufferHandle: Unpin,
<M as HandleTypeInfo>::BigIntHandle: Unpin,
M: Unpin,
impl<M> UnwindSafe for GovernanceProposal<M>where
<M as HandleTypeInfo>::ManagedBufferHandle: UnwindSafe,
<M as HandleTypeInfo>::BigIntHandle: UnwindSafe,
M: UnwindSafe,
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
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,
Source§impl<T> TopDecodeMulti for Twhere
T: TopDecode,
impl<T> TopDecodeMulti for Twhere
T: TopDecode,
Source§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,
Source§impl<T> TopDecodeMultiLength for T
impl<T> TopDecodeMultiLength for T
Source§impl<T> TopEncodeMulti for Twhere
T: TopEncode,
impl<T> TopEncodeMulti for Twhere
T: TopEncode,
Source§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.Source§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.