pub enum VersionedProposalBody {
V0(ProposalBodyV0),
V1(ProposalBodyV1),
V2(ProposalBodyV2),
}
Variants§
Implementations§
Source§impl VersionedProposalBody
impl VersionedProposalBody
pub fn latest_version(self) -> ProposalBodyV2
Trait Implementations§
Source§impl BorshDeserialize for VersionedProposalBody
impl BorshDeserialize for VersionedProposalBody
fn deserialize_reader<__R: Read>(reader: &mut __R) -> Result<Self, Error>
Source§fn deserialize(buf: &mut &[u8]) -> Result<Self, Error>
fn deserialize(buf: &mut &[u8]) -> Result<Self, Error>
Deserializes this instance from a given slice of bytes.
Updates the buffer to point at the remaining bytes.
Source§fn try_from_slice(v: &[u8]) -> Result<Self, Error>
fn try_from_slice(v: &[u8]) -> Result<Self, Error>
Deserialize this instance from a slice of bytes.
fn try_from_reader<R>(reader: &mut R) -> Result<Self, Error>where
R: Read,
Source§impl Clone for VersionedProposalBody
impl Clone for VersionedProposalBody
Source§fn clone(&self) -> VersionedProposalBody
fn clone(&self) -> VersionedProposalBody
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for VersionedProposalBody
impl Debug for VersionedProposalBody
Source§impl<'de> Deserialize<'de> for VersionedProposalBody
impl<'de> Deserialize<'de> for VersionedProposalBody
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl EnumExt for VersionedProposalBody
impl EnumExt for VersionedProposalBody
Source§impl From<ProposalBodyV0> for VersionedProposalBody
impl From<ProposalBodyV0> for VersionedProposalBody
Source§fn from(p: ProposalBodyV0) -> Self
fn from(p: ProposalBodyV0) -> Self
Converts to this type from the input type.
Source§impl From<ProposalBodyV1> for VersionedProposalBody
impl From<ProposalBodyV1> for VersionedProposalBody
Source§fn from(p: ProposalBodyV1) -> Self
fn from(p: ProposalBodyV1) -> Self
Converts to this type from the input type.
Source§impl From<ProposalBodyV2> for VersionedProposalBody
impl From<ProposalBodyV2> for VersionedProposalBody
Source§fn from(p: ProposalBodyV2) -> Self
fn from(p: ProposalBodyV2) -> Self
Converts to this type from the input type.
Source§impl From<VersionedProposalBody> for ProposalBodyV0
impl From<VersionedProposalBody> for ProposalBodyV0
Source§fn from(solution: VersionedProposalBody) -> Self
fn from(solution: VersionedProposalBody) -> Self
Converts to this type from the input type.
Source§impl From<VersionedProposalBody> for ProposalBodyV1
impl From<VersionedProposalBody> for ProposalBodyV1
Source§fn from(solution: VersionedProposalBody) -> Self
fn from(solution: VersionedProposalBody) -> Self
Converts to this type from the input type.
Source§impl From<VersionedProposalBody> for ProposalBodyV2
impl From<VersionedProposalBody> for ProposalBodyV2
Source§fn from(solution: VersionedProposalBody) -> Self
fn from(solution: VersionedProposalBody) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for VersionedProposalBody
impl RefUnwindSafe for VersionedProposalBody
impl Send for VersionedProposalBody
impl Sync for VersionedProposalBody
impl Unpin for VersionedProposalBody
impl UnwindSafe for VersionedProposalBody
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