pub struct Enum<L: LinkingScheme> {
pub type_name: String,
pub variants: Vec<EnumVariant<L>>,
pub hide_tag: bool,
}Fields§
§type_name: String§variants: Vec<EnumVariant<L>>§hide_tag: boolWhether this enum is “hide_tag“ged, meaning that the variant tags shouldn’t be displayed.
Trait Implementations§
Source§impl<L> BorshDeserialize for Enum<L>where
L: BorshDeserialize + LinkingScheme,
impl<L> BorshDeserialize for Enum<L>where
L: BorshDeserialize + LinkingScheme,
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<L> BorshSerialize for Enum<L>where
L: BorshSerialize + LinkingScheme,
impl<L> BorshSerialize for Enum<L>where
L: BorshSerialize + LinkingScheme,
Source§impl<L: LinkingScheme> From<Enum<L>> for EnumWithSerde<L>
impl<L: LinkingScheme> From<Enum<L>> for EnumWithSerde<L>
Source§impl<L: LinkingScheme> From<EnumWithSerde<L>> for Enum<L>
impl<L: LinkingScheme> From<EnumWithSerde<L>> for Enum<L>
Source§fn from(value: EnumWithSerde<L>) -> Self
fn from(value: EnumWithSerde<L>) -> Self
Converts to this type from the input type.
impl<L: Eq + LinkingScheme> Eq for Enum<L>
impl<L: LinkingScheme> StructuralPartialEq for Enum<L>
Auto Trait Implementations§
impl<L> Freeze for Enum<L>
impl<L> RefUnwindSafe for Enum<L>
impl<L> Send for Enum<L>
impl<L> Sync for Enum<L>
impl<L> Unpin for Enum<L>
impl<L> UnsafeUnpin for Enum<L>
impl<L> UnwindSafe for Enum<L>
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